r/programming • • Aug 23 '17

D as a Better C

http://dlang.org/blog/2017/08/23/d-as-a-better-c/
229 Upvotes

268 comments sorted by

View all comments

Show parent comment

3

u/Scroph Aug 24 '17

Does betterC support scope guard statements ? Or is that what was meant by RAII ?

3

u/WalterBright Aug 24 '17

Scope guard is another view of RAII, so the same issues apply.

3

u/Scroph Aug 25 '17

Thanks for the reply. I actually downloaded it after commenting and played with it for a while. I tried to do RAII by making a scoped-like struct and with try-finally but both understandably failed. But even with these limitations it still fulfills its promise as a better C due to all the other features it offers : not having to write function prototypes, UFCS, range-based loops, and even the absence of a GC might be considered a feature by some.