5 ms·
R is not trivially parsable and manipulated, since the code is not just a list. I think that’s the real magic of lisp.
by pharmakom 5y ago
R is not trivially parsable and manipulated, since the code is not just a list. I think that’s the real magic of lisp.
- deleted 5y ago[deleted]
- asdfuiopasdf 5y agoDoesn't seem like it will prevent you from doing Language Oriented Programming, or advanced embedded Domain Specific Languages. Perhaps it's less ergonomic, I am not an R user. http://adv-r.had.co.nz/dsl.html http://adv-r.had.co.nz/dsl.html
- programLyrique 5y agoAccessing the code part and modifying during execution is actually rather easy in R. Functions such as substitute or quote are commonly used and a language expression in R is a list that you can edit and evaluate back. The internals itself in R actually sound quite lispy: both values and codes are SEXP (S-expressions). R is inspired by Scheme and Common Lisp; it has first-class functions, multiple dispatch. https://www.stat.auckland.ac.nz/~ihaka/downloads/Interface98.pdf https://www.stat.auckland.ac.nz/~ihaka/downloads/Interface98... "This decision, more than anything else, has driven the direction that R development has taken. As noted above, there are quite strong similarities between Scheme and S, and the adoption of the S syntax for our interpreter produced something which “felt” remarkably close to S."
- trenchgun 5y agoInteresting. So it could be said that R is kind of a bastard child by Lisp & APL?
- jstx1 5y agoMaybe that could have been mentioned in a "why lisp" article.
- duped 5y agoI think homiconicity is the magic of LISP. Ease-of-parsing is not a quality worth optimizing for in a language
- AnimalMuppet 5y agoI agree with your first sentence; and disagree with the second. I parse code, every time I read source. Ease-of-parsing is absolutely a quality worth optimizing for. (The difference is, ease for who? Optimize for a human parser, not a machine parser.)
- kaba0 5y agoI know I will not be liked for that, but optimizing for a human parser is definitely not what LISPs are doing — we can adapt and “pattern match” the many parens but the thing is, we are better adapted for more text-like programming languages (though if someone were to say it is cultural, I would have to agree).