# 2. Thought on language design

I was watching the talk Ryan Dahl (the creator of Node) gave at JSConf EU 2018, and it reminds me of two other talks, one from Brian Kernighan on «successful language design» and one from Rasmus Lerdorf (the creator of PHP) on «PHP in 2018».

All three describe the same phenomenon: how a successful project is forced to evolved and go beyond its initial design to face its user requirements. And in each case, this evolution led to design problem. For Node, this had an impact on the module system:

[...] The module system was essentially an afterthought that got added on as users needed this stuff, and it is reflected in how Node works now. Ryan Dahl
10 Things I Regret About Node.js - Ryan Dahl - JSConf EU 2018

For Brian Kernighan, with it's long experience in language design, it's even a «general observation about languages»:

[...] The problem is that stuff was added later, so the syntax is really weird and irregular. And that i think is a general observation about languages. You start with something that you think is relatively clean. It has what would be called [...] "conceptual integrity". And then you start adding stuff to it and you lose that whatever cleanliness there might have been originally. Brian Kernighan
Computer Science - Brian Kernighan on successful language design, 2015

In the case of PHP, this is rather extreme because even the project initial goal has been changed by its users, from a templating language to a full featured language:

[...] The problem was though that people wanted to do more and more logic in the templating system. Nobody wanted to write C code and I couldn't convince people to write C code because the web was growing so fast and they weren't enough C developpers in the world. My idea of PHP never came to be [...] The entire world disagreed with me [...] And my ultimate failure came when people started writing templating systems for my templating system and at that point I knew I had lost [...] I have to switch gears and actually make this rather crappy templating language a good programming language. Rasmus Lerdorf
PHP in 2018 by the Creator of PHP

To some extends, both Ryan Dahl and Rasmus Lerdorf have faced the same issue but have completely different reactions. One is starting a new project to fix its regret about Node (checkout deno, if you haven't yet), the other is «switching gears» to met its users expectations (and not to break the internet in doing so).

And since we're speaking about design, a last quote on the subject from Ryan Dahl:

[...] What I've come to learn now that I'm aging is that whenever you're designing a program there's thinks that you think might be cute to add in. You always regret those. If they are unnecessary and simply cute, don't do them. Ryan Dahl
10 Things I Regret About Node.js - Ryan Dahl - JSConf EU 2018

But really, you should go watch the Brian Kernighan talk now.

Last updated: 12/28/2019, 8:24:16 AM