Re: Which do you prefer?
- From: "Tom Leylan" <gee@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 4 Dec 2006 23:52:12 -0500
Hi Michael:
I think you'll find it is a good idea. It isn't easy for me to explain and
it has a tendency to draw out the "my language is better than yours" folks.
But for some 25 years I have cautioned people against using language or
platform "unique" solutions. The definition of a language-unique feature
would be one that isn't (generally) found in other languages. So variables,
functions loops and conditional tests aren't unique and should be used.
Something like instantiating a variable upon first use (the opposite of
OPTION EXPLICIT) is uncommon and generally a bad practice so I caution
people to avoid it. Unique features make it harder to translate from or to
other languages. dBASE for instance had a CLEAR ALL command which was
"easy" in some people's eyes but horrible from the perspective of a software
developer.
In any case the AddHandler syntax permits you to disable handlers, or to
change handlers at runtime and it is the mechanism used in C#. Similar
"handler-like" assignments are available in other languages but nothing but
VB.Net is going to have "Handles Button1.Click" type syntax. Reliance on
these types of things tends to lead to "VB programmers" instead of
programmers who use VB.
Your mileage may vary...
Tom
"Michael C" <nospam@xxxxxxxxxx> wrote in message
news:OwIsrg$FHHA.1784@xxxxxxxxxxxxxxxxxxxxxxx
"Tom Leylan" <gee@xxxxxxxxxxxxxxxxxx> wrote in message
news:%23lO0A96FHHA.420@xxxxxxxxxxxxxxxxxxxxxxx
Hi Blake:
I also prefer the AddHandler syntax and for the same reason you mention.
I find it more readable, more flexible and less ambiguous. One should
never mix the styles and I'd have the "Handles" code reworked if somebody
submitted them to me.
I'm not sure that would be a good idea. The handles keyword supports the
designer where I presume the AddHandler does not.
Michael
.
- Follow-Ups:
- Re: Which do you prefer?
- From: Michael C
- Re: Which do you prefer?
- References:
- Which do you prefer?
- From: Master Programmer
- Re: Which do you prefer?
- From: Michael C
- Re: Which do you prefer?
- From: Cor Ligthert [MVP]
- Re: Which do you prefer?
- From: Blake
- Re: Which do you prefer?
- From: Cor Ligthert [MVP]
- Re: Which do you prefer?
- From: Blake
- Re: Which do you prefer?
- From: Tom Leylan
- Re: Which do you prefer?
- From: Michael C
- Which do you prefer?
- Prev by Date: Re: FSO equivalent in VB.net
- Next by Date: Re: Complete Newbie
- Previous by thread: Re: Which do you prefer?
- Next by thread: Re: Which do you prefer?
- Index(es):