|
|
|
|
|
by dragonquest
3526 days ago
|
|
Learning Lisp, more specifically Scheme. I became curious about it after reading ESR's "How to Become a Hacker". When homoiconicity and other Lisp goodies gradually permeated my brain, the computing world seemed different. I saw every config file differently, trying to see how the lines between config and code blurred. Method abstractions and bottom up design became much easier. I appreciated all those prefix-evaluation assignments in college. I found a new respect for languages with good REPL's. And finally, it opened my eyes to computing history, where I discovered newer is not always better. The elders of old really got many things right. |
|
I feel sad when I hit special forms in languages, and can't just a macro to change the language to suit the way I want to do it.
It made every other language I used feel overly verbose. Sure, Scheme is a bit verbose, but with two or three macros, and a handful of recursive functions, I write about 1/3 of the code I would in another language.
Having readers, and parsers exposed makes it so easy to fit the language to the task, rather than bludgeoning the language with a hammer, or rephrasing the question till it almost fits.
Random example:
You need to allow a user to run half a dozen functions, with a syntax.
Normal approach, (after you've argued you shouldn't do this), is to write a parser and evaluator, and hope you didn't expose a security hole like SQL injection by accident.
Scheme approach: Generate an empty environment, attach only the necessary functions. Parse and handball to the environment.
Eval doesn't have to be evil, especially when the language provides the tools you need to sandbox users.