4 ms·
I think `eval` along with `lambda` is slightly mind bending distinguishing feature of LISP/Scheme, but for sure, dedicated, optimized eval-less LISP/Scheme are
by iamnotsure 4y ago
I think `eval` along with `lambda` is slightly mind bending distinguishing feature of LISP/Scheme, but for sure, dedicated, optimized eval-less LISP/Scheme are possible and exist, if we consider s-expressions the distinguishing feature. Prolog is another language with elegant circular-meta-interpreters.
- eru 4y agoPython has both eval and lambda these days, and is not normally considered mind bending nor a Lisp. Even C++ and Java have lambdas these days. (To be fair, Python's 'eval' operates on strings, Lisp likes its eval to operate on something much more (but not quite) like abstract syntax trees. But it would be relatively straightforward to make a version of Python that uses s-expressions and has an eval that works on them; without changing anything else about the language.) Apart from matters of parsing, being able to build elegant circular-meta-interpreters isn't too hard nor special, if your language is reasonably simple but still has enough functional programming features.
- iamnotsure 4y agohttps://github.com/stereobooster/programming-languages-genealogical-tree https://github.com/stereobooster/programming-languages-genea... https://en.wikipedia.org/wiki/Homoiconicity https://en.wikipedia.org/wiki/Homoiconicity
- eru 4y agoAs I said, you can make a version of Python that uses s-expressions without changing anything else about the language. You can even give that same treatment to C! Python is also perfectly capable of manipulating s-expressions at runtime. (It's much more of a hassle in C. But that's because almost everything is more of a hassle in C.) Homoiconicity is fun, but it's not a very deep property of your favourite language. See https://github.com/eratosthenesia/lispc https://github.com/eratosthenesia/lispc for someone making a C with s-expression syntax.
- iamnotsure 4y agoMy point was that LISP (1958) appeared earlier than Python (1991). What would be a deep property of a programming language?