[dba-VB] Recent Discussion from MS on VB.Net and C# in VS 2010

jwcolby jwcolby at colbyconsulting.com
Tue Mar 16 07:57:59 CDT 2010


 > If I could write a mathematical algorithm that worked without using parentheses, I would, and so 
would everyone else.

No you wouldn't.  The parens  are often inserted INTENTIONALLY to make the equation more readable, 
even though it is often quite possible to cause the thing to work without them, and the math 
professor TEACHES US to use them to make the equation more readable and to ENSURE that it does what 
you intend.

 > Fortunately, I can write code without them.

No, you can't!  You use:

If () then
Begin
end
Else
begin
end

While ()
begin
end

With()
begin
end

Those Begin / End keywords are nothing more that parenthesis.  Long, wordy, verbose parenthesis but 
parenthesis none the less.  The parenthesis group the code into blocks that execute together.  Use 
begin / end or {}, makes no difference to me but you are doing the exact same thing regardless.  The 
language designer did NOT include them because they are unnecessary.

(X + Y) * (z^2-3)

Who in their right minds would WANT

begin  X+1 end * begin x^2 -3 end

I LIKE a lot of things about VB but Begin / END is NOT one of them.

John W. Colby
www.ColbyConsulting.com


Dan Waters wrote:
> Public Dan Response()
> 
>     If I could write a mathematical algorithm that worked without using
>     parentheses, I would, and so would everyone else.
> 
>     Fortunately, I can write code without them.
> 
> End Dan
> 
> 
> 
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby
> Sent: Tuesday, March 16, 2010 7:21 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
> 
> LOL.  It is amazing to me that everyone on this list never thinks a thing
> about using parenthesis to 
> group mathematics for readability and to specify execution order and yet we
> have people bitching and 
> moaning about a programming language that does the EXACT same thing!
> 
> ;)
> 
> (X + Y) * (z^2-3)
> 
> Who in their right minds would WANT
> 
> begin  X+1 end * begin x^2 -3 end
> 
> Which is the more readable?
> 
> In the end it is all about comfort level.  People (me included) don't want
> to have to take the time 
> and effort to learn a new way.
> 
> I am making the effort and I am happy I am, and it is a waste of time and
> breath to continue this 
> conversation further.  Do I really care whether Max (or anyone else) wants
> to do the same?
> 
> John W. Colby
> www.ColbyConsulting.com




More information about the dba-VB mailing list