The discussion of "lisp 1" vs "lisp 2" designs periodically occurs in the comp.lang.lisp newsgroup, and may be the subject of a FAQ. The Scheme dialect of lisp is a lisp 1. Common Lisp is a lisp 2.
The question revolves around the issue of whether there is are separate namespaces for functions and values or do they share the same space. Sometimes you cannot reach consensus. (defun foo(x cos) (cos x)) calls the cosine function , cos, in common lisp, and ignores the second arg of foo. (defun foo(x cos) (funcall cos x)) uses the second argument as the function to apply. Maxima is like a lisp 2. foo(x,cos):=apply(cos,[x]); this is what you should say. however, if you do this in Maxima.. foo(x, _xyzzy_) := _xyzzy_(x) you will use the second arg for a function to apply, so long as there is not a separately defined function in the visible scope with the name _xyzzy_. Does this make everyone happy? Probably not. RJF On Feb 26, 3:26 pm, Robert Bradshaw <rober...@math.washington.edu> wrote: > On Feb 26, 2009, at 2:54 PM, Mike Hansen wrote: > > > > > On Thu, Feb 26, 2009 at 2:52 PM, YannLC > > <yannlaiglecha...@gmail.com> wrote: > > >> Thanks for the explanation. > >> I definitely don't like this shortcut: > > >> sage: var('foo bar') > >> (foo, bar) > >> sage: E = foo+bar > >> sage: E(5) > >> foo + 5 > > >> why not "bar +5" ? > > >> but I'll learn to live with it :) > > > It goes by alphabetical order by default: > > > sage: E.variables() > > (bar, foo) > > Yes, this is strange, and one thing that I'm glad is going away. (I > like the f(...) notation, but only if there's no ambiguity to be > resolved.) > > - Robert --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---