4 ms·
"Just because you can, doesn't mean you should." In particular, this Applies to Eval.
by Fixnum 17y ago
"Just because you can, doesn't mean you should."
In particular, this Applies to Eval.
- windsurfer 17y agoFor some small applications, it can be handy to eval a configuration file that is simply a language data structure. It's like having a built-in config file parser. It also gives to lots of flexibility with your hacks :)
- viraptor 17y agoSome languages are nice enough to provide functions that parse the text into native data without the need for evaluation (like erlang's erl_parse/erl_scan; I guess lisps can do the same)
- jballanc 17y agoThat's why I said "Just because you can, doesn't mean you should" and not "Don't even think about it". 'eval' exists for a reason, and there are certainly good reasons to use it. This is not one of them.