if(;){} opinion

clayasaurus clayasaurus at gmail.com
Tue Feb 28 06:12:54 PST 2006


Is it more concise to the maintainer if they are unfamiliar with the 
given type?

(in case of 'if (m; mystery())' maintainer will have to discover what 
mystery() returns instead of knowing it returns given 'type' right off 
the bat.

Might this negate any time saved in typing?

Walter Bright wrote:
> "clayasaurus" <clayasaurus at gmail.com> wrote in message 
> news:dtvmkf$2e1a$1 at digitaldaemon.com...
>> I'll vote against it because I don't understand the value of
>>
>> if (m; search("abcdef", "BcdasdfD"))
>>
>> over
>>
>> if (Regexp m = search("abcdef", "BcdasdfD") ) .
>>
>> Maybe someone can enlighten me?
> 
> 1) m is implicitly typed
> 2) looks like the foreach
> 3) more concise 
> 
> 



More information about the Digitalmars-d mailing list