What is the correct use of auto?

Georg Wrede georg at nospam.org
Sun Apr 13 14:40:21 PDT 2008


Robert Fraser wrote:
> Unknown W. Brackets wrote:
> 
>> I completely disagree.  Especially when your dogfood is good, you 
>> should share it and not horde it for yourself.
>>
>> Teaching newbies to program differently than you think is best seems 
>> wrong to me.
> 
> I was thinking of "newbies to the library" instead of "newbies to the 
> language". It's good practice in the language, but I remember trying to 
> use a Mango servlet and spending an hour looking up what types were 
> returned by functions in examples so I could figure out how to extend & 
> change the example code.

If a writer is /both/ talented and diligent, he writes every single 
sentence separately. At /each/ single sentence he addresses 4 separate 
audiences, and treads so carefully that /each/ of these 4 audiences 
actually gets something out of the sentence, while none of the others 
feel insulted.

Good examples are Knuth's books, K&R, The Java Programming Language (by 
Arnold & Gosling), Turbo Pascal Reference Manual, for version 3.0 (no 
authors, just Borland).

The 4 audiences are: total newbies (not belittling their intelligence), 
newbies to the particular language (but accomplished, or possibly even 
Veteran Programmers elsewhere), those who have begun with this 
particular language, but who haven't had any Formal Education in 
Programming, and finally, those who are both seasoned programmers and 
who also have extensive experience in the programming language at hand.



More information about the Digitalmars-d mailing list