4 ms·
Only in early Lisps (and the broken newLisp) are functions lists. The syntax for functions is lists. But at runtime functions are their own type.
by eru 16y ago
Only in early Lisps (and the broken newLisp) are functions lists.
The syntax for functions is lists. But at runtime functions are their own type.
- dexen 16y agoPardon? [1] Are you sure? [2] How about no? [3] Perhaps you prefer Vim over Emacs? [4] --- [1] http://en.wikipedia.org/wiki/Picolisp http://en.wikipedia.org/wiki/Picolisp my favorite [2] http://en.wikipedia.org/wiki/Scheme_(programming_language) http://en.wikipedia.org/wiki/Scheme_(programming_language) probably the best known [3] http://en.wikipedia.org/wiki/Arc_(programming_language) http://en.wikipedia.org/wiki/Arc_(programming_language) this bloody website runs on it [4] http://en.wikipedia.org/wiki/Emacs_Lisp http://en.wikipedia.org/wiki/Emacs_Lisp the good, the bad and the ugly, all in one package
- deleted 16y ago[deleted]
- eru 16y agoIn Scheme try and compare (car (list 1 2 3 4)) with (car (lambda (x) x)) But I guess we are talking about different levels of abstraction?
- dexen 16y agoIndeed, you are right about Scheme (and Arc). Thanks for the correction.
- eru 16y agoSure, no problem. I guess Emacs Lisp falls under the old-and-broken category. And Picolisp eschews functions as a data-type by choice. Do you know whether Picolisp offers lexical scoping?
- akkartik 16y agoIt offers something similar-but-not-quite called transient symbols: http://www.software-lab.de/doc/faq.html#problems http://www.software-lab.de/doc/faq.html#problems Alternative phrases for similar-but-not-quite: insidious, error-prone.
- dexen 16y agoAs the other response says. The FAQ provides some rationale & makes it clear you can, actually, build robust software with picolisp's model of scoping. My understanding is, ``dynamic scoping is faster for an interpreter'' and ``funarg is easy to avoid and closures are possible''. See the three following points: http://www.software-lab.de/doc/faq.html#dynamic http://www.software-lab.de/doc/faq.html#dynamic http://www.software-lab.de/doc/faq.html#problems http://www.software-lab.de/doc/faq.html#problems http://www.software-lab.de/doc/faq.html#closures http://www.software-lab.de/doc/faq.html#closures
- amttc 16y agoNot that this has too much to do with what you two were talking about, but (car '(lambda (x) x)) will return lambda in Scheme.
- eru 16y agoYou are right. Actually I was almost going to add (car '(lambda (x) x)) to my post in the first place; in line with `The syntax for functions is lists.'