Why is D unpopular?

max haughton maxhaton at gmail.com
Tue May 24 07:02:29 UTC 2022


On Tuesday, 24 May 2022 at 06:12:40 UTC, forkit wrote:
> On Monday, 23 May 2022 at 22:42:52 UTC, max haughton wrote:
>> On Monday, 23 May 2022 at 22:05:23 UTC, forkit wrote:
>>> On Monday, 23 May 2022 at 14:07:32 UTC, deadalnix wrote:
>>>> On Monday, 23 May 2022 at 13:55:34 UTC, wjoe wrote:
>>>>> On Monday, 23 May 2022 at 09:45:21 UTC, claptrap wrote:
>>>>>> [...]
>>>>>> Asserts are removed in release mode unless it is 
>>>>>> assert(0). Its idiotic.
>>>>>
>>>>> Isn't that C behavior though?
>>>>
>>>> C asserts are included or not based on various defines.
>>>
>>> It's rather odd, that it's so much easier in C.
>>>
>>> // uncomment to disable assert()
>>> // #define NDEBUG
>>>
>>> (whereas) .. So much mucking around in D. It's ridiculous.
>>
>> It's a command line option versus a macro (likely supplies on 
>> the command line). It's just fuss over nothing.
>
> I don't fuss over 'nothing'.
>
> First, I have to 'remember' that assert is removed in -release, 
> but that depends on how you've actually used it.
>
> Then, in order to leave my assert's in production code, I need 
> to 'remember' not to compile with -release, but rather 
> -someothercrap I can't remember at the moment.
>
> So while it's not the end of the world, it's also not 'nothing'.

This is very close to nothing when it comes to actually shipping 
code.

By the time you have something in "production" you will have 
bigger things to worry about than implementing your policy for 
assertions i.e. reading the manual.

The idea of a release build is something of a mistake anyway, 
it's usually not exactly right for a given purpose so you're 
better off specifying exactly what you want instead anyway. I use 
the flag more often on compiler explorer than anything else.


More information about the Digitalmars-d mailing list