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

Charlotte Foust cfoust at infostatsystems.com
Tue Mar 16 12:54:26 CDT 2010


In the current versions (2005 and 2008), there are some things you can do in C# that you can't do in VB, but not many.  Of course, there's nothing to stop you from using, say, a J# dll to harness the power of THAT dialect, so it isn't an overwhelming advantage.  There are things you can do in VB you can't in C# too.  In the next version, that becomes history.  There's a lemming trend that seems to happen with languages:  the more esoteric the language, the more "professional".  If any fool can read the code and possibly make sense of it, it can't be a "real" language for "professional" programmers.  Weren't you aware of that??

Charlotte Foust

-----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 10:44 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

Actually, I'm enjoying the discussion, don't leave yet.  I installed
Visual Studio 2008 months ago, cause some day I'm going to dig into C#
and VB.Net when I have time! (that very well might be after the world is
destroyed in 2012, but hey, here's hoping I get to it!)

LOL.

I would like to point out that your example (X + Y) * (Z^2-3) isn't
using parenthesis for 'readability'.  You have addition in the first,
and subtraction in the last, and multiplication in between, if you
didn't have parenthesis in your statement, the function would be
completely different.  Please Excuse My Dear Aunt Sally.

But you bring up a good point, about mathematics and coding.  Usually
coders are good at math.  Now don't take this the wrong way, cause this
specifically isn't pointed at you, but in my experience, a lot of
'developers' are actually database people that have picked up coding,
and coders are usually only using a database to store data relevant to
their code.  It's rare to find people that delve into multiple worlds
and have them come out with compartmentalized understanding, or even
relational understanding between the various worlds.  But it's almost
impossible to have people learn another sphere of learning without
picking up some 'quirks' from the learning source! ;)  

So as to your statement about brackets 'simplifying'
grouping/readability, I think that needs to be substantiated a little
more.  In the C world, which has it's own structure, it makes sense.  In
the examples:

class SomeClass
{ 
    private int someField; 
 
    public int SomeField 
    { 
        get { return SomeField; }  
    }
}

Can be written as...
class SomeClass
{ 
    public int SomeField { Get; }
}

3 groups in one, 2 in another.  In VB:

Public SomeField as Integer

No grouping at all, but it's only one property, in what could be a
simple class. In your example, (X + Y) * (Z^2-3), what good does (X + Y)
* ((Z^2)-3) do?  It doesn't change anything, and it really doesn't make
anything more or less readable.  In fact, it is just lengthening the
function.  

Moreover, both languages are commonly indented in groupings.  

If Something Then
	Do Something
Else
	Do SomethingElse
End if

Brackets in the indentations are just overkill.

Now, seriously, I can't believe you find {} and case sensitivity to be
actual attractions to C#.  I can understand that it may make sense
within the C# paradigm, couldn't argue that if I wanted too!  What is
the pull to C#, other than more googable source and client requests.  Is
there any aspects of the language where you can truly do something that
others can't?  (From my personal perspective, there is functionally
nothing I can't do in VB, that you can do in anything else.  I don't
program for OSes other then Windows, and many of the 'limitations' of VB
6, such as multi-threaded or NT services, I can actually do.  I would
like true inheritance, so that is my only real pull into the .Net world
at all, right now!) 

Drew






More information about the dba-VB mailing list