apoch / epoch-language

Home of the Epoch Programming Language Project
Other
72 stars 3 forks source link

dynamic_cast is taking over the world #151

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We have a lot of code that invokes dynamic_cast to do ugly type-specific things.

We should really factor those out into very well-contained functions and 
ideally prefer virtual dispatch to take care of as much of that work as 
possible.

Obviously code gen and a few other places will still need to be ugly by nature, 
but we can improve a lot on the current situation.

Original issue reported on code.google.com by don.ap...@gmail.com on 17 Nov 2012 at 4:55

GoogleCodeExporter commented 9 years ago
This is kind of a non-issue now that the compiler is self-hosted. The majority 
of evil was in the C++ implementation of the compiler, so I'm a lot less 
concerned now.

Code quality is of course still a major issue in much of the C++ stuff, but 
that should be examined separately.

Original comment by don.ap...@gmail.com on 5 Sep 2014 at 5:47