Difference in compiler design for OOP languages
I'm doing research on how the design of a compiler for an OOP language differs from traditional imperative languages. I'd just like some topics to send me on my way, and if you wish, you can ex开发者_C百科plain them.
For eg. I found that the type table is built differently.
Before the "compiler design" can be explored, I think the more fundamental question of "language design" needs to be addressed.
Should the language be statically typed? Dynamically typed? Early/late bound or a combination? Supporting generics? Is inference a goal? Should types be closed or open? How should sub-typing work? (Should implicit sub-typing be allowed at all?) Covariance? Contravariance? Single-inheritance? MI? SI with Traits? Explicit memberwise-selection? Prototypal (That is, should there even be a notion of "class" and "instance"?) Should types in nominative or based off of member signatures? Single-dispatch or multiple-dispatch? Are members invoked as first-class citizens or message-passing? Are types the same as classes? Is there a distinction between "value" and "reference" types? Etc, etc, etc... and this is just the tip of a very large iceberg.
精彩评论