DMD 1.031 and 2.015 releases

Jarrett Billingsley kb3ctd2 at yahoo.com
Wed Jun 18 09:51:54 PDT 2008


"Walter Bright" <newshound1 at digitalmars.com> wrote in message 
news:g3ba3r$ppu$1 at digitalmars.com...

> Good question!
>
> Because deducing the return type requires semantic analysis, and for 
> functions that introduces the old forward reference chicken-and-egg 
> problem. This doesn't happen with function templates, because semantic 
> analysis of them doesn't happen until later.

And what exactly is the problem?  It's "too hard" to implement, or?

I thought D was supposed to drop forward reference restrictions.

Furthermore, the compiler already has support for deducing return types for 
delegate and function literals.  Why can't the same mechanism be used for 
declarations? 




More information about the Digitalmars-d-announce mailing list