Re: sLisp
Brought to you by:
set
From: Thiago F.G. A. <tf...@za...> - 2001-09-25 04:22:41
|
On 24/09/01 09:50:18, salvador wrote: >> let > >I think what you wrote is currently: >(setv "str" (GetSelection)) There is a difference: the variables created by 'let' are local. They only exist inside the let expression. The variables created by setv are all global, right? I don't know, setv solves my problem, but I think it would be nice to have local variables in the language too. >> cond > >And I think that's >(if (not (strcmp "#i")) (InsertText "...")) There is a difference here too. "cond" is like if-elseif-else: (cond (test1) (action1) ; if (test1) (action1) (test2) (action2) ; elseif (test2) (action2) (test3) (action3) ; elseif (test3) (action3) t (else_action) ; else (else_action) ) The alternatives are mutualy exclusive. If one of the tests succeed, it executes the corresponding action and jumps out of the cond. It doesn't go trough any of the other tests. >> == >> (Lisp has several equality predicates (eq, equal, =,...). I don't know to which the one I am >> asking for corresponds, but it would be good to use the same notation as Lisp). > >I don't know, the only reason of the "Lisp" like stuff is that it is really easy to parse. >I preffer to make it closer to C and Perl. Yes, you're right. Lisp has some confusing stuff. What was I thinking of? :) >I agree, something like (call "function" [arguments ...]) could help. >The implicit way (function ....) could be also a solution, not sure. Since we are talking about this, I'd like to ask for two more things: 1) defun 2) The ability to define macros with more than one func call without using 'eval'. The eval would be implicit. Another idea is: replace defmacro with defun. The macro becomes a function with no args. Thiago |