4 ms·
Lua runs the same risks as Scheme which is another small language - of multiple incompatible implementations cropping up because it is so easy to create an impl
by dman 6y ago
Lua runs the same risks as Scheme which is another small language - of multiple incompatible implementations cropping up because it is so easy to create an implementation. [Dont mean to downplay the difficulty of writing an implementation just to highlight that the engineering cost of doing so is not prohibitive enough]
- jdc 6y agoEh the way I see it, an implementation either passes the canonical Lua test suite(s) or it doesn't.
- bch 6y agoSimilar for scheme (to degrees: I.e. r4rs, r5rs, r6rs, ...) and I still found it confounding and nerve racking to find a place to start. This may be a place where “technically correct is the best correct” doesn’t hold, at least in terms of community psychology.
- bjoli 6y agoStarting with scheme for most people I talk to seems to follow a similar path: start with one implementation. Write some code. Try it in another scheme. Discover r6rs. Either like it and switch to chez or guile or keep using whatever it was you are using. I have a pretty small data set (5 people) and three of them are guile users. Scheme is however willfully underspecified, whereas most other languages lack specifications of even a proper base language (except for code). Implementing scheme is pretty easy apart from continuations and macro hygiene, but those parts are very well specified somat least you know what you are aiming for.
- xanathar 6y agoI was almost semi-proud of having done my implementation, why did you ruin the party. Jokes aside, and not to boast about what I did, honestly, but Lua is (in hindsight - I wish I realized before) full of gotchas which are definitely not easy to implement (just one word which still makes my stomach hurt: COROUTINES). I honestly think there are simpler (and better) languages to target. With hindsight, experience and pain, of course.
- dman 6y agoYou have every right to be extremely proud of what you accomplished - writing your own compiler is extremely gratifying and you have my respect!
- samus 6y agoOn the contrary - multiple implementations happen if there is a specification. These languages tend to fragment if the spec is too big or if there is no good compatibility testsuite. On the other hand, languages like Perl make it impossible to create another implementation because the original implementation is the spec. That requires any other implementation to follow the original's behavior in every weird corner case that has been observed or might just be spotted in two years from now. Reimplementers will never be done and be tightly tied to the original project, which would make the whole endeavour pointless for most intents and purposes.