3 ms·
What would actually stop you from building a language like Perl or Ruby from scratch? Once you've parsed them (which is admittedly much more difficult than Per
by jeffasinger 13y ago
What would actually stop you from building a language like Perl or Ruby from scratch?
Once you've parsed them (which is admittedly much more difficult than Perl), writing a relatively slow interpreter for the core language in C or similar wouldn't be that difficult.
- kbenson 13y agoWhat would actually stop you from building a language like Perl or Ruby from scratch? Perl currently has no specification, other than the latest release of the interpreter. What the interpreter does may be decided to be incorrect by consensus at some point, and changed (although Perl has a very strong history of backwards compatibility so it's unlikely to change unless it was unuseful before), but there is no external resource besides the code and the compiled interpreter to explain how it should behave in every case.
- webjprgm 13y agoNo, but I have my own mental model of how it works, and if I were trying to preserve my own Perl code I'd only need the subset of Perl that I understand and use. I could reconstruct that from scratch with no reference other than my own Perl source code.
- kbenson 13y agoThat's true. And with CPAN Testers and the output of the tests of all the modules against the latest version, you have a pretty damn good reference to go by.