> Most of the planet doesn't treat editor configuration as software. We do.
This is so true! And it applies to many, many other types of configuration as well.
> Most of the planet doesn't treat editor configuration as software. We do.
This is so true! And it applies to many, many other types of configuration as well.
Awhile ago, we've used this code as data approach in a game development studio for everything. For example, maps/levels were stored as a Lua scripts that get executed on load and contain a sequence of PlaceObject, SetProperty, etc invocations.
It doesn't come without drawbacks, though. For example, Autodesk Maya stores scenes as Mel code (as a bunch of createNode, connectAttribute, setAttribute commands). This script gets executed on load in a single thread (utilizing a single from your N cores) and scene loading can take ~30 min on large scenes. Security is also an issue but it's fixable with proper environment sanitation and sandboxing.
Just because you treat data as code doesn't mean you have to force it into a Turing-complete language. It just means that you should document it, format it properly, put it into version control and deliver it for deployment.
Moreover, Turing-complete languages are more of an anti-pattern here. The proper design pattern here is the Rule of Least Power:
https://en.wikipedia.org/wiki/Rule_of_least_power
It means you should choose the least powerful language suitable for a given purpose.
And this is where DSLs or "data as code" can play its advantages: Not just makes it things shorter and simpler, but you can also force it into a less powerful language, which allows you to eradicate certain types of bugs and security issues by not making them even expressible anymore. Moreover, you can run your data structure through different "interpreters" doing different things with it, which is completely inpractical of your data structure describes a too powerful language.
Got any hard numbers to back up that bold claim?
By which measurable metric is Lisp "one of the best"?
I'm genuinely curious, since I keep hearing propaganda about it.
I don't have the time to write up why I think Lisp is great, but you can find essays by many greater (and more famous) programmers than me such as Richard Stallman, Peter Norvig, Steve Yegge, Paul Graham et al. But really the only way is to learn it for yourself. There is a kind of enlightenment that comes with learning Lisp and I would recommend it to every programmer.
I also seem to recall a paper from the 90s or early 2000s which compared speed of development & program execution between Lisp & other languages. Maybe it was somewhere on Ron Garrett's site? IIRC, Lisp programs were developed consistently more quickly than C/C++/Java/SmallTalk, and were normally faster than all but the very fastest C/C++ programs — but I could misremember. I remember that it had some interesting-looking charts.