Proposal: real struct literals

Jarrett Billingsley kb3ctd2 at yahoo.com
Tue Jun 24 19:02:11 PDT 2008


"Bill Baxter" <dnewsgroup at billbaxter.com> wrote in message 
news:g3s45g$1ork$1 at digitalmars.com...

>> Tricky, but I'm sure that some (reasonable) constraints could be put on 
>> this type of function to make it easier to disambiguate.
>
> One thing that's lacking is that you wouldn't be able to tell which named 
> parameters were set vs which not set.

Ooh, yeah.

>> Failing using structs as named parameters, there's certainly nothing 
>> stopping the compiler from allowing named parameters with functions as 
>> they are now.  They have the names right there :P
>
> Except 36 years of experience with C and C++ that makes people expect that 
> the names of formal parameters don't matter.  I think the only way to make 
> such a big change palatable at this point is to require some special 
> syntax to use it.

Funny, I don't feel the same way, probably because I've used D more than I 
have C or C++ ;) 





More information about the Digitalmars-d mailing list