Re: 2 ways to initialize, what's the difference?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I don't know about everybody else but if you have a quick "review" of Vista
I'd be interested to hear it. I'm going to upgrade eventually but I figured
I'd wait a patch or two :-)

Tom

"Stephany Young" <noone@localhost> wrote in message
news:u2V0P$kUHHA.1200@xxxxxxxxxxxxxxxxxxxxxxx
Thanks Tom. I was quite busy for a while rolling out 500 Vista desktops,
but that's out of the way now and Im back with a vengance :)

I'm certainly not advocating the use of a mish-mash of styles, nor will I
permit my staff using a mish-mash of style. You're absolutely correct that
consistency is the key.


"Tom Leylan" <tleylan@xxxxxxxxxx> wrote in message
news:%237wql1kUHHA.4668@xxxxxxxxxxxxxxxxxxxxxxx
"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







.



Relevant Pages

  • Re: 2 ways to initialize, whats the difference?
    ... If the compiled IL is different and/or the execution of one form is implemented differently then that is a completely different matter. ... 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 is probably that; if the person can't bother to spell correctly what else can't they bother to do? ... If Control.Selectand Control.Focusare interchangeable I'd consider which one was used in other .Net languages, which one was likely to be used more often and finally which was found in other languages ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Got Expertise?
    ... common attitude here or anywhere? ... So, as I said before, it might be this matter of attitude. ... some research (and we're talking a very BASIC research here) on my own ... before I bother anyone else with requests. ...
    (alt.games.warcraft)
  • Re: horse metaphor
    ... I have never attempted to make a donkey shit against its will...nor would I particularly want to, donkeys, I am sure, being quite capable of deciding when they need to defecate! ... Perhaps I should have said "steed"...but, again, does it really matter? ... The Spanish is self-evident, and as you appear to speak the language I shan't bother to explain. ...
    (alt.usage.english)
  • Re: horse metaphor
    ... thought a little crass and not particularly helpful. ... "a"...But does it really matter? ... The Spanish is self-evident, and as you appear to speak the language I ... shan't bother to explain. ...
    (alt.usage.english)
  • Re: "Fitzgerald" pronunciation [was: Re: Pronunciation of the name Antoinette]
    ... spelling, and then claimed that it could not be changed. ... I dislike being addressed as "Graham". ... But, no matter how much I make this dislike known, acquaintances ... parents had given you a name that everyone knew how to spell as soon ...
    (alt.usage.english)