Designing a Programming Language (2015)
ducklang.org
ducklang.org
It reminds me of back in the early days of the Internet when developers were the only web designers. Most programming languages are designed by the same people implementing them.
The common critique is that language designers might create a syntax incompatible with the limitations of the computer itself, but that’s the same challenge web designers had to learn in designing something that will look great in the constraints of the browser, and not just look good in Photoshop.
Or, do you mean that linguists might design programming languages without ever having learned how to program?
Yes
We don't need similar discipline which cranks out programming languages.
To some measure, we need programming languages in which regular programmers can crank out domain specific notations to suit whatever work they are doing.
Engineers themselves use languages for designing and communicating their work. Civil engineers have blueprints with their notations; electrical engineers have schematics, SPICE netlists; and so on. They don't need a sub-discipline to continuously crank out new kinds of these languages, right?
Similarly software engineering has languages. It has a lot more of them than electrical or civil engineering, but that's just the consequence of those languages not only being the product of software engineering as well as the production tool.
Non-software engineering also produces tools which are used in engineering. We have a myriad of tools for all sorts of situations. Machinists produce tools, which can be used by machinists to produce tools; that's a bit like computing.
In computing, there are tools other than languages though. For instance, there are API's and libraries. There is still a lot of work, for instance, in people who integrate platforms: bring up new systems on a chip, and move code to next generation systems.
New API's are needed much more than new languages, and so the case can be made that API's are more like tools than languages. Machinists generally don't need a new design language in order to make new tools. A new tool is an adapter between a process (like construction, maintenance) and a new situation; it's like a HAL. A differenty shaped screwdriver or whatever isn't a new language.
How much "and so on", though? Schematics. SPICE. VHDL. Verilog. That's all I can think of off the top of my head, but I'm not an electrical engineer. There might be a few more - especially for subspecialties like, say, power engineers.
How many languages do software engineers commonly use? Maybe ten. (I will admit that the word "commonly" is doing a lot of work for me...)
And you could look at something like TypeScript as being a new API on JavaScript.
So I'm not sure that we're that far out of line with something like electrical engineering. We just have a really long tail of languages that relatively few people use. To me, it feels like those "don't count" in a way, but you could regard it as cheating to ignore them.
Note well: I am not at all saying that the languages we have are optimal for programming. I'm just saying that as a discipline, we mostly use a very few languages.
Another consideration I should have mentioned is compensation. Civil engineers get paid for instantiating a new bridge somewhere.
There is no money in cranking out programming languages.
It takes years of dedication to just make one good one.
There are dozens of hardware description languages. In addition to Verilog and VHDL I've encountered SystemC and Bluespec as well as a number of less popular and academic languages (Lola, Esterel, even JavaScript-based HDLs...) (I've also encountered various lower-level languages, for schematics, netlists, or VLSI layout.) Languages enabling formal specification and verification seem particularly hot at the moment.
Matlab/Octave and Scipy/numpy are certainly big in EE for signal processing and other applications.
Obviously C-like languages and Python are used in many EE applications, as are GPU languages like CUDA and OpenCL.
This implies that language design should be somewhat of a specialty within computer programming, which indeed, it would appear to be.
A new language is like some sweeping new paradigm of too-and-die making, such that if the tool-and-die shop converts to it, they no longer see eye-to-eye with other shops. Too-and-die makers from elsewhere have to retrain on new concepts to work there.
Or something.
I don't know how many developers do paid, full-time work on languages, but it has to be more than a thousand. Heavily weighted towards mature languages? Yes, of course. Harder than it should be to do what Andrew Kelley is doing with Zig, or Andreas Rumpf is doing with Nim? Also yes... probably! My bias is to say that this is systemically undervalued, but I don't know how to prove it.
Lastly, if we're really trying to find the closest analogy to toolmakers in the developer community, it's going to be developer tools, not just language work. At the risk of being silly, working on languages is like being a toolmaker at a tool factory, and working on new languages is like being on a team which is bringing a new CNC mill (for example) to market. No surprise there aren't many of us!
If you want to say that developer tooling is underrecognized as a profession, undersupported by the ecosystem, and so on, well I firmly agree with you. But there is no question that it's paying rent and mortgages for a lot of people, right now. It's likely that more developers want to do this than the market will bear, and I believe it is equally true that many a machinist wished that he could leave the factory floor and go work in the shop. Cranking out widgets will never be as fun as iterating on the best widget jig you can make, but without widgets to sell there isn't much of a market for widget jigging either.
Both Forth and Lisp have seen less adoption than their aficionados think they deserve as a result of their offputting-to-muggles syntax.
In both cases, arguably the most important merits of the language actually necessitate the unusual syntax. That might mean that Lisp and Forth couldn't have done better with more conventional syntax. If so, what that means isn't that you should after all give minimal attention to the parser; it's that in some cases a syntax that's very simply parseable might be a good one -- but, unless you get very lucky, you will only discover that by thinking deeply about your syntax rather than doing something minimal and hoping it ends up having subtle merits like those of Forth and Lisp.
Parsing nearly killed my interest in programming languages, it's rarely the part that get people excited.
It's always better to check types rigorously and as soon as possible.
If so, then it's doing runtime type checking.
octave> strtrim(" hello world ")
ans = hello world
octave> strtrim([1,2,3,4])
error: strtrim: S argument must be a string or cellstring
error: called from
strtrim at line 79 column 5The most important point in designing a programming language is to avoid design by committee. Use a team for feedback, tests or docs. But nothing else. He didn't even mention that principle.