by Ace17 · 9y ago · 0 comments
It's not fundamentally incompatible with "Better C" semantics, especially if there are no exceptions.
Exceptions have two issues:
1. D exceptions currently require the GC. There is a Pull Request to fix that, but it isn't incorporated yet.
2. More problematic is the Dwarf exception handling mechanism requires a language specific "personality" handler. This is supplied by the D runtime library. Trying to trick the C runtime library one into working with D isn't a solved problem at the moment.
If that's the only hold-up, IMO the way to go is to abort at the boundary, when an exception would propagate into frames without unwind tables. RAII is too valuable to do without!
I'm not exactly sure what you mean here, but all I really want is guaranteed destructors. Can we just have those?
It's a good thought. D as Better C is new for us, and we'll be flexible in making it work better.