Charlotte Foust
cfoust at infostatsystems.com
Tue Mar 16 12:59:33 CDT 2010
I must admit that curly brackets affect me much as the Paradox script that used If..Then blocks with no End If. Harder than hell to figure out where one ended. With curly brackets littering the landscape and representing stuff that only C# family programmers may be able to interpret at a glance, I can't be bothered unless I really need to translate an example into equivalent VB. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, March 16, 2010 10:42 AM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: Re: [dba-VB] Recent Discussion from MS on VB.Net and C# in VS 2010 Hi Drew -- OK. Even if "the only 'accurate' part on my statement is BRIEF" that's good enough for me. Max and Charlotte, do you agree with that Drew's anagnorisis ? :) Thank you. --Shamil {^;^} -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Tuesday, March 16, 2010 8:24 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Recent Discussion from MS on VB.Net and C# in VS 2010 " curly brackets do enhance code readability, make it unambiguous, clear, relevant, accurate and as brief as possible" The only 'accurate' part of that statement, Shamil, is BRIEF. Unabmiguous.... Nope, If I write Function TestProcess(), I better see an End Function. Not End If, End Loop, End Sub, I know I am looking for End Function to be on the last line of the function. With a {....him, now I'm looking for a }, hey there's one...oh wait, I hit a { first...wait, another {, and another, okay, and here's a }, and oops, another {, crap, is that 3 or 4 {'s, darn, need to go back up. Or, I could trust the programmers 'perfect ' indentation to verify that the brackets are good...... So is indentation and faith really less ambiguous then finding the first 'End Function'? Clear ... Hmmmmm, that pretty much is the opposite of ambiguous, thus it's the same as unambiguous. But I'll smack some more logic on this term for you...after scrolling through a page of code, exactly how does } give me a clear indication of what just happened? End If tells me I just hit the end of a logical statement. End Function tells me I just hit the end of a procedure...... What did } tell me that I just ended? Relevent ... Hmmm, spilled into this one with Clear..... what again did } just end? How is it relevant at the bottom of a page I've scrolled down to get too? Accurate ... Really? Odd, if I miss an End if, the compiler will tell me, 'Missing End If', does a C compiler tell you you're missing a }? I know when I'm writing SQL with a slew of parenthesis, getting told that a ) is missing is like finding a needle in a haystack sometimes. But getting told, hey, you're missing an End if....MUCH easier to find, because the language is providing a MORE accurate relevance, which is clearer, and less ambiguous to a human eye/brain, then symbols with tribal meaning. Man, I could do this all day! And to think I rarely post on this list! ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, March 16, 2010 7:02 AM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: Re: [dba-VB] Recent Discussion from MS on VB.Net and C# in VS 2010 OK, Max :) Not trying to convince you (:)) just noting that curly brackets do enhance code readability, make it unambiguous, clear, relevant, accurate and as brief as possible - all using just two generic (helping hands) symbols - '{' and '}' . And in most of the cases curly brackets are inalienable (indefeasible, integral, essential) part of the code - remove them and code blocks will become ambiguous... Programming languages do come from mathematics, and therefore (IMO just IMO) using special symbols to keep a programming language syntax as concise and as unambiguous as possible is a good and productive idea... And in VB(A)(.NET) one have to use the whole set of (natural language) substitutes: - Namespace ... End Namespace - Module ... End Module - Class ... End Class - Sub ... End Sub - Function ... End Function - For ... Next - While ... End While - If .... Then ... End If - ... Thank you. -- Shamil {^;^} _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com