Mohan S N wrote:
> --- Thomas Hruska <[EMAIL PROTECTED]> wrote:
>> Ananth wrote:
>>> Simple thumb of rule I've always followed:
>>> (1) Cast all variables in a statement to same type
> 
> why why why?

Well, the the main reason do that is because it forces the compiler to 
do what the developer wants it to do not what the compiler thinks it 
should do.

In general, though, I don't need explicit casts.  Just when I need to 
make absolutely certain the compiler will behave a certain way.  When 
you've been burned by not casting as I have, this habit tends to form as 
a natural response.


>>> (2) Always use parenthesis to mark each token even when not
>> required,
>>> it makes life much easier for someone else who's going to maintain
>>> your code, and easy to understand on editors like VS where you can
>>> navigate between parenthesis using CTRL + ]
> 
> +1

This isn't Slashdot.  Please don't do Karma here.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to