5 ms·
About a decade ago, I would have agreed with this 100%, and I still am fascinated and, quite frankly, awed by Racket and LOP (and looking forward to Racket Fest
by mpweiher 8y ago
About a decade ago, I would have agreed with this 100%, and I still am fascinated and, quite frankly, awed by Racket and LOP (and looking forward to Racket Fest 2019 here in Berlin[1]).
But.
(You knew there was a "but").
While I don't quite agree with the assertion that with the right tooling (so: this tooling), creating a language is as easy as creating a library, I don't think it would solve our problems even if it were true.
Language design is much harder than library design, even if the tooling is perfect and transparent. In the extreme we're going to end up with what Alan Kay calls inverse vandalism[2] aka the Mount Everest Effect: making things because we can, not because we should or they're good.
In essence, designing a (domain specific) language should be your last resort, not your first resort. At least one that requires a parser or macro system to implement. After all, when we create a library, we are in fact creating a domain specific language, or at least a domain specific vocabulary. A framework goes a little further towards the idea of language. In fact, the first version of Simula was a simulation DSL. It was the second version that made the language into an OO language and the simulation "DSL" into a framework. The advantage being that you can use the same language with different frameworks for other domains.
If we look at natural language, it is very much the same: we use the same language to talk about any number of domains, the most we tend to add is some domain-specific vocabulary. Imagine the tower of babel we would suffer under if every domain had a completely new and different language!
That effect was very much encountered and later described by the LRG at PARC when they started using Smalltalk 72, which allowed every object to defined its own language[3]. It was chaos! Turns out we are not very good language designers in the heat of the programming battle. So they very consciously made the language more restrictive later. However, the Smalltalk message syntax is specifically designed to give you something akin to DSL, but without most of the problems[4].
A similar effect was documented by Bonnie Nardi for end users. Here as well, the expectation was that users would prefer domain-specific tools that were tailored exactly to their needs. This, surprisingly, turned out not to be the case. End users apparently vastly prefer general tools, even if the effort to adapt them to specific tasks is greater (see also: people writing documents in Excel...)
That said, current general purpose programming languages are probably not quite flexible enough. I think there is a sweet spot to be found somewhere between Smalltalk-80 and something like Racket.
[1] https://racketfest.com https://racketfest.com
[2] http://worrydream.com/EarlyHistoryOfSmalltalk/ http://worrydream.com/EarlyHistoryOfSmalltalk/
[3] http://stephane.ducasse.free.fr/FreeBooks/BitsOfHistory/BitsOfHistory.pdf http://stephane.ducasse.free.fr/FreeBooks/BitsOfHistory/Bits...
[4] https://youtu.be/Ao9W93OxQ7U?t=627 https://youtu.be/Ao9W93OxQ7U?t=627
- miltondts 8y agoMaking a language "in the heat of the programming battle" is indeed a very bad idea. So is making a lib. On the other hand I really would like to see a world with 10s or even 100s of little (preferably non Turing complete) languages with extremely good integration(with each other) and very good tooling and visualizations. Because right know the languages we use tend to be way too powerful. This prevents good tooling and optimizations.
- openfuture 8y agoReminded me of this: http://langsec.org/occupy/ http://langsec.org/occupy/
- kasey_junk 8y agoI largely agree but then I enter the modern ops stack where templated yaml is the lingua franca. It’s incomprehensible and for each system you are operating you have to learn some arcane yaml incantations that have dramatic impact on your production systems. It’s a world crying out for a set of well factored dsl.
- discreteevent 8y agoBetter than a dsl would just be a mature general purpose programming language with tooling etc. https://news.ycombinator.com/item?id=19108787 https://news.ycombinator.com/item?id=19108787
- mpweiher 8y agoOr a general purpose language with the ability do describe architectural configurations?
- nmadden 8y agoI think this is what Pulumi (https://www.pulumi.com https://www.pulumi.com) is trying to achieve.
- grok2 8y ago