3 ms·
Horribly. C++ has so many features, and interactions between them, that you really don't want to be dragged into that as a toy project. I'd wager that the C++ l
by apk17 10y ago
Horribly. C++ has so many features, and interactions between them, that you really don't want to be dragged into that as a toy project. I'd wager that the C++ language spec is longer than the source of a functional C compiler (both without the standard libraries).
- userbinator 10y agoMaybe the interactions aren't actually the issue because the features are quite orthogonal and independent of each other, and the complexity is really the natural result of the interactions between them. If I wanted to write a C++ compiler I'd probably start by adding features in this order: - Member functions in structures; constructors; destructors - Single inheritance - Virtual functions - Exceptions - Multiple inheritance - Virtual inheritance - Templates There's definitely more I haven't listed, but the first few don't seem too difficult...