4 ms·
Genuinely curious: what do you mean with respect to "R's non-standard evaluation" and its relationship to DSLs? Thanks in advance.
by throwaway29103 6y ago
Genuinely curious: what do you mean with respect to "R's non-standard evaluation" and its relationship to DSLs?
Thanks in advance.
- CreRecombinase 6y agoR some very lispy meta-programming features. Very briefly, if I'm a function (go with me here) `foo <- function(x,y){whatever}`,and someone calls me, `foo(bar,baz)` I get to know that `baz` is "bound" to `y`. The caller doesn't even have to have a `baz` in scope; substituting `y` for `baz` is done lazily, if the function never asks for the actual value of `y`, there's no problem. You can read more about this here http://adv-r.had.co.nz/Computing-on-the-language.html http://adv-r.had.co.nz/Computing-on-the-language.html
- throwaway29103 6y agoGreat
- nerdponx 6y agoR gives you the ability to capture un-evaluated expressions, manipulate them, and then evaluate the manipulated versions. This ability lets you construct some fairly powerful DSLs and language extensions.
- throwaway29103 6y agoThanks for the succinct explanation
- tmoertel 6y agoI wrote a summary that goes into some detail: http://blog.moertel.com/posts/2006-01-20-wondrous-oddities-rs-function-call-semantics.html http://blog.moertel.com/posts/2006-01-20-wondrous-oddities-r...
- throwaway29103 6y agoFantastic