3 ms·
eh, i dunno. i think anybody with a decent grip on any language can whip up a scheme compiler way faster than a C compiler. [1] is a very readable guide to sche
by jfoutz 7y ago
eh, i dunno. i think anybody with a decent grip on any language can whip up a scheme compiler way faster than a C compiler. [1] is a very readable guide to scheme and its implementation. Will it be the fastest gun in the west? no. Is it a simple workable foundation that, like, anybody who can put together 100 lines of working code, in any language, can build? for sure. Compilation isn't magic.
Lambda calculus won't hurt. Implementing scheme (which imho is pretty darn close to the lambda calculus) really just requires understanding some operational semantics and you're good to go.
[1] (http://agl.cs.unm.edu/~williams/cs491/three-imp.pdf http://agl.cs.unm.edu/~williams/cs491/three-imp.pdf)
- mjburgess 7y agotyped pure functional programming is not "functional programming" in the scheme sense. It's often approached much more formally, using the terms and methods of category theory -- and that is very much the approach of this book.
- classified 7y agoQuite. But pretty darn close is still not close enough to support partial application via curried functions out of the box.
- jfoutz 7y agoAbsolutely. I'd argue, if somebody has written their own interpreter and compiler, leveraging the interpreter at compile time first for constant expression evaluation and then something more sophisticated for partial function evaluation is a lot more intuitive. You can kinda climb a hill of difficulty rather than be teleported to the top and wish them luck. (To be totally fair i keep trying to open the pdf, but the browser tab locks up. So maybe my observations are meaningless) _edit_ There is no royal road. but some roads are perhaps longer, but a little easer to travel.