[dba-Tech] On Odious Code

Porter, Mark MPorter at acsalaska.com
Tue Aug 3 12:52:10 CDT 2004


I have seen guidelines for coding style which dictates that the most likely answer of an If...Then statement should be an affirmative.  Using that rationale and the example below, the most likely answer for the If statement is that it is not 'Nothing'.

That kind of a guideline can produce oddly syntaxed code like this.

Mark

> -----Original Message-----
> From: dba-tech-bounces at databaseadvisors.com
> [mailto:dba-tech-bounces at databaseadvisors.com]On Behalf Of 
> Arthur Fuller
> Sent: Tuesday, August 03, 2004 2:19 AM
> To: 'Discussion of Hardware and Software issues'
> Subject: [dba-Tech] On Odious Code
> 
> 
> Does anyone but me find this syntax odious? (Lifted from a 
> .NET example)
> 
>       If m_Enter IsNot Nothing Then
>         m_Enter.Invoke(sender, e)
>       End If
> 
> What is this "IsNot Nothing" crap? Have we descended to those 
> languages
> in which any negative requires a pairing (i.e. as in French, ne <verb>
> pas)? Why not test the positive case instead? I guess my time has past
> and this syntax is now considered kewl. But it makes me hurl, just as
> "to each their own" makes me hurl. I realize that language is 
> a process
> not a static object, but sheesh. "IsNot Nothing"? Come on! Even if we
> want to preserve the negative attitude, can't we substitute "<>" for
> IsNot?
> 
> I'm beginning to hate where programming is going.
> 
> A.
> 
> _______________________________________________
> dba-Tech mailing list
> dba-Tech at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-tech
> Website: http://www.databaseadvisors.com
> 

***********************************************************************************
3/8/2004
This transmittal may contain confidential information intended solely for
the addressee. If you are not the intended recipient, you are hereby
notified that you have received this transmittal in error; any review,
dissemination, distribution or copying of this transmittal is strictly
prohibited. If you have received this communication in error, please notify
us immediately by reply or by telephone (collect at 907-564-1000) and ask to
speak with the message sender. In addition, please immediately delete this
message and all attachments. Thank you. ACS





More information about the dba-Tech mailing list