News for hackers. Stuff that matters.
Re:D as a C Replacement by mhh__ on Tuesday July 02, 2019 @06:01PM (#20339768)
Even when I only really need C, the contract programming that D provides is really helpful as it provides a macro free way of doing rigorous assertions etc. in a way that I can turn off without infecting the actual logic code. If a struct's payload cannot be null, for example, getting the compiler to insert checks into all uses in debug builds can be done easily

That and metaprogramming in D is all compile time so you get RSI-free hands, for free.

Re:D as a C Replacement by pjmlp on Wednesday July 03, 2019 @01:05AM (#20341740)
C++20 is also getting contracts, just as info.

The more languages that support DbC the better.

Re:D as a C Replacement by vram22 on Wednesday July 03, 2019 @05:23PM (#20348947)
Eiffel may have been one of the first languages to support DbC (Design by Contract).

https://en.wikipedia.org/wiki/Design_by_contract#History