Hacker News new | past | comments | ask | show | jobs | submit login
Growing a Compiler (2009) (dartmouth.edu)
234 points by ingve on May 28, 2017 | hide | past | web | favorite | 16 comments

This made me find and read "Growing a language"


"In a race, a small language with warts will beat a well designed language because users will not wait for the right thing; they will use the language that is quick and cheap, and put up with the warts. Once a small language fills a niche, it is hard to take its place."

Thanks for the link. I hadn't heard of it, but ended up reading through just now.

For any else who hasn't come across it before, it's a simultaneous discussion of and example of what it means to express oneself using a 'small' language. It also gets into how such small languages may be effectively designed to grow into larger languages. The document itself is an example of the process using a subset of the English language, but Steele's focus is on planning/architecting programming languages which can be effectively grown by: providing effective, general primitives which can be used to define new terms and rules for the language; and structuring the language development process in 'bazaar' fashion, allowing many people to participate in design and implementation, while someone with excellent judgement surveys contributions with an eye for good ideas/work.

I liked this quote, which is a fairly typical example of some definitions he has to make in order to stick to his own rules for the project:

Meta means that you step back from your own place. What you used to do is now what you see. What you were is now what you act on. Verbs turn to nouns. What you used to think of as a pattern is now treated as a thing to put in the slot of an other pattern. A meta foo is a foo in whose slots you can put foos.

(His use of pattern here is in the sense of pattern vs. instance.)

I thought his conclusions on what he learned by carrying out the project were also interesting and insightful. Here's part of it:

I learned in my youth, from the books of such great teachers of writing as Strunk and White, that it is better to choose short words when I can. I should not choose long, hard words just to make other persons think that I know a lot. I should try to make my thoughts clear; if they are clear and right, then other persons can judge my work as it ought to be judged.

Edit: fixed formatting.

This should be in the preface to the Rust Evangelism Strikeforce Field Operations Manual.

Nah, you haven't really avoided success at all costs until you've evangelized a committee-designed functional language with pervasive laziness.

YouTube link for those interested: https://www.youtube.com/watch?v=_ahvzDzKdB0

Swift is an interesting anomaly in that the incentive to use it is so great, that tens of thousands of devs are willing to put up with the growing pains.



I think the "worse is better" [1] theory explains this much better. Although Javascript had the additional benefit of not having any competition.

[1] https://en.wikipedia.org/wiki/Worse_is_better

No competition? How about Flash, Java applets, ActiveX, Silverlight, and even VBScript -- which Microsoft pushed to compete directly with JavaScript as the embedded scripting language for the web.

All of those were either additional plugins that had to be installed, came with a huge vulnerability surface and/or were closed standards.

JavaScript lives in a more diverse environments: Multiple browsers, webkit engine, now NodeJS, React, etc.

Varieties, cross pollination from different JS engine/teams make JS much stronger.

Flash, ActiveX, Silverlight, VBScript are all seem more mono-culture - Start to die as soon as the parent organizations/core dev team loss interest / move on to to next best thing.

Flash is a successful until CPU usage, security issues kill it. Just like strong mono-culture plant in a farm got wipe out certain deceases/virus.

An interesting approach! But old META II (mentioned in the original article) system and its derivatives are looking more practical to me. I think, it's more effective to have two simple DSLs, one for parsing and another one for tree transforming like it was done in Cwic and TREE-МЕТА, which are grew from original META II (self-described in a few lines of code).

The amount of JS bashing here is so high. Pretty much any popular language fits the given description. Humble yourself and read about why your language of choice sucks: https://wiki.theory.org/index.php/YourLanguageSucks

Please don't do programming language flamewars here.

We detached this subthread from https://news.ycombinator.com/item?id=14435298 and marked it off-topic.

I'm may be mistaken, but I interpret jamescostian's comment as "every language has some problems, let's stop this sort of discussion". May you intended to detach the parent comment ?

Get real.

Registration is open for Startup School 2019. Classes start July 22nd.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact