No need for version expression is a lie
Walter Bright
newshound2 at digitalmars.com
Mon Aug 21 19:27:57 UTC 2023
On 8/21/2023 11:46 AM, Basile B. wrote:
> However that approach was used. It really looks like an alternative to a version
> OrOr. There are plenty of other examples in drutime sources.
Druntime was written by many people, and does not exhibit consistent best practices.
> Sure at some point there is also the problem of the unix standards...Every
> distribution can choose its own value for the flag of this func or that
> one...which creates complexity in C `define`s, but should not in D. There is a
> problem that is not solved.
I've dealt with enough professional C .h files to conclude that #ifdef algebra
is the worst solution. This includes the ones I have written.
The objectives of minimizing keystrokes and maximizing clarity are only rarely
aligned.
I understand that many of D's design decisions are out of step with conventional
wisdom. They aren't the result of reading about best practices, but instead
decades of living with those practices.
More information about the Digitalmars-d
mailing list