static this sucks, we should deprecate it

Denis Koroskin 2korden at gmail.com
Thu May 28 09:13:01 PDT 2009


On Thu, 28 May 2009 20:00:43 +0400, BCS <none at anon.com> wrote:

> Hello Denis,
>
>> On Thu, 28 May 2009 19:44:42 +0400, BCS <none at anon.com> wrote:
>>
>>> Hello Steven,
>>>
>>>> fails to compile due to the perceived circular dependency, even
>>>> though none exists.
>>>>
>>> IIRC it compiles, but fails as soon as you run it.
>>>
>>>> -Steve
>>>>
>> Which is even worse. Walter stated that "silently generating bad code"
>> (i.e. code that doesn't work) is a top priority bug.
>>  I wonder why this design flaw isn't fixed for so long...
>>
>
> It's not silent. It fails loudly, reliably and immediately. The only way  
> it can slip thought is if you don't even TRY to run the exe before you  
> ship.
>
>

Generating code has nothing to do with running it (unless compiler automatically runs compiled executable before returning 0)

As far as DMD is concerned, is does silently generate a binary that doesn't work (and yes, you notice it immediately when you run it).

That's *exactly* the same as silently generating bad executable. You run it and get "Executable is corrupted" message (or something like this).

I don't believe it can be used as an excuse for not fixing this bug.



More information about the Digitalmars-d mailing list