Why is D unpopular?
Walter Bright
newshound2 at digitalmars.com
Wed May 25 18:51:11 UTC 2022
On 5/23/2022 8:43 PM, max haughton wrote:
> On Tuesday, 24 May 2022 at 02:05:39 UTC, Walter Bright wrote:
>> On 5/23/2022 7:07 AM, deadalnix wrote:
>>> C asserts are included or not based on various defines.
>>
>> Building them in offers some semantic advantages,
>>
>> 1. being able to get them to do things line insert a HLT instruction
>> 2. format an error message based on stringizing the expression
>> 3. people won't be motivated to create their own
>
> Another reason is that forcing people down a blessed road means that the means
> you provide for fiddling with behaviour can be composed together much more
> easily (whether this be some runtime hook or merely all Assertions throwing the
> same Error).
>
>
A user can still write their own myAssert(). But by building it in and making it
so convenient, this just doesn't happen. It's also why `debug` is builtin -
managers had complained to me that they could never get C++ code written by
different teams to work together because they each developed their own `debug`
conventions.
More information about the Digitalmars-d
mailing list