Google's Go & Exceptions

John D jdean at googling.com
Sat Jan 30 21:13:33 PST 2010


"Walter Bright" <newshound1 at digitalmars.com> wrote in message 
news:hk1v87$1pem$1 at digitalmars.com...
> John D wrote:
>> "Walter Bright" <newshound1 at digitalmars.com> wrote in message
>>> This goes back to my theory that a feature that encourages the 
>>> programmer to insert misleading dead code to shut the compiler up is 
>>> a misfeature.
>> A programmer who does the above is not a good programmer.
>
>
> The reality is, even the best programmers will do such things if it is 
> convenient to, even if they preach against it and know it is wrong.

That is oxymoronic: can't be "the best" without discipline and 
self-control. Also "know thyself" is important: if a programmer really 
doesn't feel like programming and would rather be out playing softball, 
he should go out and play software instead of just hacking. IMO, but 
ideals and abstract discussions like this, especially in text, are not 
very useful, so let's end what I started.

>
>
>> That said, a compiler that doesn't warn that variables or arguments 
>> have gone unused in a function is not a good compiler. That said, a 
>> language that doesn't enforce return val checking is not a good 
>> programming language.
>
> I often have unused variables and such when developing and debugging 
> code, and when using conditional compilation, and having the compiler 
> nag me about them would be very irritating.

So you are indeed saying that the D compiler gives no such warnings, or 
that you programming at a lower warning level? Personally, I always 
program with the highest warning level turned on. I don't regularly 
generate so many warnings, but rather errors and that seems somehow 
correct to me. If I made a compiler for my proprietary business, there 
would be no switching to a lower warning level, but then I'm a hard-ass 
director I guess. Please don't assume that I'm suggesting that others 
should use my methods, for I am not. I'm just stating what I do and what 
I would/will require of others working for me ("with" me is a whole new 
ballgame for me). 





More information about the Digitalmars-d mailing list