dmd 2.029 release

Nick Sabalausky a at a.a
Mon Apr 20 15:16:10 PDT 2009


"Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message 
news:gsiqdr$1csj$2 at digitalmars.com...
> BCS wrote:
>> Reply to bearophile,
>>
>>> Andrei Alexandrescu:
>>>
>>>> If it were an error, I wouldn't let it go.
>>>>
>>> It's an error. It will lead to troubles.
>>>
>>> Bye,
>>> bearophile
>>
>> Then there need to be a way for the format string to use an argument 
>> without generating output for it because as Andrei is saying, there are 
>> real world cases where not using all the args is *normal* and not an 
>> error.
>>
>> One option would be to not throw an error if the format string uses 
>> indexing formats (e.i. out of order formatting)
>
> Yah, that's an option I considered. Maybe it's the best way to go.
>

That would be far too clumbsy, unless you made it into two separate 
functions.

For instance (psuedocode):
auto userInput = getUserInput()
// userInput now contains "{Name} at {Address}", zip deliberately ignored
writefln(userInput, name, address, zip); // They're used in-order, but there 
shouldn't be an error




More information about the Digitalmars-d-announce mailing list