D should disallow forward references

grauzone none at example.net
Tue Aug 25 08:32:22 PDT 2009


Jarrett Billingsley wrote:
> On Tue, Aug 25, 2009 at 10:54 AM, grauzone<none at example.net> wrote:
>> Jarrett Billingsley wrote:
>>> For two, NO.  Disallowing forward references sucks.  It's entirely
>>> possible to implement a compiler that resolves forward refs correctly.
>>>  If W doesn't want to do it, that's on him.
>> I agree; but: I'm just saying that disallowing it would actually be better
>> for the programmer, than leaving it half-broken.
> 
> Then let's drop every buggy feature.  :P
> 
> The best solution would be to *fix it*, or *make a new compiler that
> works right.*

It's not like this is really going to be fixed.

And other compilers don't throw up either, when you present them code 
with complex structure. Just in dmd, it seems to dependent from the 
internal structure of the compiler, *if* or *how* something works. The 
worst thing is, Walter doesn't seem to care...

Actually, it's much simpler to solve forward reference and cyclic 
dependency issues in C than in D. Ah, the power of simplicity.



More information about the Digitalmars-d mailing list