On 10/17/2014 12:04 PM, Kevin Lamonte wrote:
What do y'all think? Would you be comfortable with saying to people implementing new runtimes, "please version your differences from druntime in this particular way" ?
It's a good idea, but having a bunch of versions quickly devolves to an unmaintainable mess, in my experience. For one issue, when one adds a new piece of code, which versions apply in what ways? Once the number of versions exceeds a certain level, I've never seen it done right.
A better solution is to have modules that "plug in" or not. The gc is designed this way.
Also, dmd's source code is also (largely) done this way. Stuff that would normally be #ifdef'd is instead abstracted away to an interface. My experience with such techniques is they work well, are relatively problem free, and are much easier on the eyes.