by hnthrowaway0328 · 1y ago · 0 comments
I could and have written a few toy interpreters, but I have no academic or industrial background (on the matter of language design), so it is useful to know why they put some features into a language, and why they don't. It is actually one of the most confusing parts of writing an interpreter for a toy language -- in all of my projects I simply pick a subset of an existing language I know about, e.g. Python or C.
To get the best historical sense, pick a language feature that has evolved in several steps over a number of years, e.g. async/await, type annotations, the GIL, etc.
For ordered dicts, for instance, which is topical because of [1] posted two weeks ago, the relevant PEPs are:
- PEP372: The original collections.ordereddict proposal in Python 3.1 [2]
- PEP468: Making kwargs ordered in Python 3.6 [3], which also made standard dicts ordered.
[1] https://news.ycombinator.com/item?id=45756058
[0] http://archive.adaic.com/standards/83rat/html/ratl-TOC.html