On Programing Language specification writing (2026)

By Xah Lee. Date: .

on programing language spec

been reading the javascript spec for 10 years. it's very confusing. for example, the [#private in obj] is in this section. (screenshot) dificult to find.

i think the js spec is pretty badly written. that it could be better done with math foundation approach.

but js spec is only lang spec i really dived in. but i've read or scanned hundred other spec, such as unix RFC, w3c dom, etc. they pretty much worse shit.

there are two aspects bad. one is, usually they are result of commitee writing, 10 times verbose than necessary, with stilted formality. This fake formality, makes the spec incomprehensible to most, even professional coders of 10 plus years. examples are, say email spec, url spec, http spec, xml spec, html spec, dom spec.

second aspect is that, they take a english descriptive approach. i think it would be better if taken as math foundation proof system approach. but this approach i think would be pretty novel, that we are not mature enough to do before, but can be today. (imagine, the compiler compiler read the spec and auto produce a compiler. but such would be difficult for fucked up langs like c cpp.)

js spec private field in 2026-09-30 1458f ll
js spec private field in 2026-09-30 1458f ll
js spec private field in 2026-09-30 142db ll
js spec private field in 2026-09-30 142db ll