Re: sLisp
Brought to you by:
set
From: salvador <sal...@in...> - 2001-09-25 12:20:05
|
"Thiago F.G. Albuquerque" wrote: > 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. Sure, but not a high priority thing ;-) > >> 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 same, currently the language lacks some indispensable structures. Adding stuff that can be done with other statements (just typing more or needing to pay more attention) aren't high priority. Of course patches are welcome ;-) > 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. I think that's the same to use: (if (test1) (action1) (if (test2) (action2) (...))) Like in C: if (test1) {action1} else {if (test2) {action2} else {...}} > >> == > >> (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 What about it? > 2) The ability to define macros with more than one func call without using 'eval'. The eval > would be implicit. Why? I agree a "call" is needed but is the same again: I don't want to add now things that are redudant, just to save typing. > Another idea is: replace defmacro with defun. The macro becomes a function with no args. Maybe. SET -- Salvador Eduardo Tropea (SET). (Electronics Engineer) Visit my home page: http://welcome.to/SetSoft or http://www.geocities.com/SiliconValley/Vista/6552/ Alternative e-mail: se...@co... se...@ie... Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013 |