Re: 2 ways to initialize, what's the difference?
- From: "Tom Leylan" <tleylan@xxxxxxxxxx>
- Date: Fri, 16 Feb 2007 23:38:27 -0500
"Stephany Young" <noone@localhost> wrote in message
news:Otj$xbkUHHA.5100@xxxxxxxxxxxxxxxxxxxxxxx
You will find 'purists' who will argue till the cows come home that one
form is correct and the other isn't or that one form is is better and the
other isn't but if both forms compile to identical IL then the argument is
purely acedemic and it is up to you to use the form that you feel most
comfortable with.
If the compiled IL is different and/or the execution of one form is
implemented differently then that is a completely different matter. (The
use of Control.Select() over Control.Focus() fits into this category.)
Hi Stephany glad to see you're back. I'll agree that it can be academic but
I'm not sure I'd characterize it as purely a matter of personal choice. In
the extreme case one might argue that spelling doesn't matter and it's the
idea that counts yet a resume' filled with spelling errors isn't likely to
receive the same attention as one with no spelling errors. The rational
(rightly or wrongly) is probably that; if the person can't bother to spell
correctly what else can't they bother to do?
If nothing else one's choice should be consistent. I'd rather read code
using a style that I don't like (but consistently) than code written using
every known (and some unknown) style. Differences within a project (or
worse a single file) look to me like I'm viewing somebody's experiment (the
code finally worked) rather than their solution. If Control.Select() and
Control.Focus() are interchangeable I'd consider which one was used in other
..Net languages, which one was likely to be used more often and finally which
(if either) was found in other languages (notably C++, Java, et. al.)
Rather than describe the process as "academic" I prefer the word "finesse."
Any boob can produce code these days... if they can't write it on their own
they can cut & paste it from the Internet or use a code generator. What
they can't do by borrowing chunks of code or using a wizard however is craft
something elegant.
Tom
.
- Follow-Ups:
- Re: 2 ways to initialize, what's the difference?
- From: Stephany Young
- Re: 2 ways to initialize, what's the difference?
- References:
- 2 ways to initialize, what's the difference?
- From: Zytan
- Re: 2 ways to initialize, what's the difference?
- From: Stephany Young
- Re: 2 ways to initialize, what's the difference?
- From: Zytan
- Re: 2 ways to initialize, what's the difference?
- From: Stephany Young
- 2 ways to initialize, what's the difference?
- Prev by Date: Re: 2 ways to initialize, what's the difference?
- Next by Date: Exception: Timeout expired
- Previous by thread: Re: 2 ways to initialize, what's the difference?
- Next by thread: Re: 2 ways to initialize, what's the difference?
- Index(es):
Relevant Pages
|