Eloquence of language

Posted Sun, Jun 27 2004 16:26 by bill

Great to see another Aussie VB guy answer the call! Greg Low, all round nice guy even if he is from Queensland , has moved his blog onto the msmvps.com blog site. So now you can read Greg’s entries from both the Aussie bloggers feed and the MS MVPs feed.

In Greg’s latest post, he raises some good points about the positioning of VB and also talks about the benefits of choosing VB.  I fully concur!!

The bit I liked the most was when he talked about struct instead of Structure. Brevity is no excuse for decrease of readability. Taking C# for instance, block structures are enclosed with { and }, whereas VB.NET is explicit in saying Sub .. End Sub, Function .. End Function, If .. End If etc.  The C# style is very much like those who declare variables as a,b,c,d etc rather than having to type a descriptive, informative name. And we all know that is a bad practice, it’s a lazy practice.

To me, VB.NET is more evolved. It has higher forms of language. It uses *words*.  C# on the other hand has some pre Neanderthal form of language that basically consists of various grunts. { and } are grunts and only by the bone waving of the surrounding code do they relay the actual meaning of the grunt.

As for C# being used in universities, well that’s kind of understandable. Students generally are evolving. Computer Science students learn primitive grunts of 0’s and 1’s, progress to low level assembly and early evolution C style languages. For them, C# is the logical choice as they are still learning, and like any homo sapiens they have to learn to crawl before the learn to walk or run. It’s probably not until they leave university//college that they will get the knowledge and wisdom that only the real world and maturity bring. (there are of course always exceptions ).  But as they do evolve, many of them will indeed see that in the real world VB is incredibly strong and wide spread even though it is not taught in CS.

So perhaps they should be asking why is it that fortune 500 companies choose VB over C style languages, that VB is so strong yet is not part of the Computer Science curriculum. Maybe they really need to be asking whether their curriculum is still relevant, or is it becoming out dated. Are C# languages really only used because of outdated Computer Science courses, and are those students who use C style languages exhibiting signs of inability to evolve?  Probably the real two big questions they need to ask is why are the numbers of students taking up Computer Science dropping, instead of increasing. Given the evolution of computers in society, one would expect that to be high growth, so there seems to be some serious signs of Computer Science itself failing to evolve ;)

The number one question is of course, why does C# require the break statement in a switch block? Is that some kind of antediluvian tar pit construct ?

Evolution in terms of computers and computer languages is about bringing computers closer to human language and human needs and uses, not some re-hash1 of early grunts.

1. Ironically, # is pronounced “hash”, which is quite fitting when you think of it as C# really is just a rehash of C style languages ;)

Filed under: ,

Comments

# Eloquence of language

Saturday, June 26, 2004 11:32 PM by TrackBack

# Bill On: Eloquence of language

Sunday, June 27, 2004 4:15 AM by TrackBack

# Eloquence of Language?

Sunday, June 27, 2004 12:12 PM by TrackBack

# Eloquence of Language?

Sunday, June 27, 2004 12:14 PM by TrackBack

# re: Eloquence of language

Monday, June 28, 2004 10:40 AM by bill

:The number one question is of course, why does C# require the break
:statement in a switch block? Is that some kind of antediluvian tar pit
:construct ?

Is this a serious question are or you poking fun? I can answer it if you like :)

# re: Eloquence of language

Monday, June 28, 2004 11:45 AM by bill

"So perhaps they should be asking why is it that fortune 500 companies choose VB over C style languages, that VB is so strong yet is not part of the Computer Science curriculum."

A CS curriculum should have abolutely nothing to do with specific langauges like VB or C except to use as examples.

A CS curriculum does not exist to produce programmers (for whom a langauge is just a tool to allow them to effectively do their job). It exists to produce computer scientists.

# re: Eloquence of language

Monday, June 28, 2004 11:46 AM by bill

"Evolution in terms of computers and computer languages is about bringing computers closer to human language and human needs and uses, not some re-hash1 of early grunts."

It most certainly is not.

# re: Eloquence of language

Monday, June 28, 2004 11:51 AM by bill

"The number one question is of course, why does C# require the break statement in a switch block? Is that some kind of antediluvian tar pit construct ?"

It requires it because it is commonly viewed that switch's can be a source of bugs due to programmers forgetting a break statement. Because one of the tenets of a managed language is to go for the safe route first, it was decided that programmer should have to be explicit with switch statements. If they want to fall through, they can do so, but now they must use code (as opposed to a comment, or just forgetting altogether) to state that that was their intent.

# re: Eloquence of language

Monday, June 28, 2004 6:52 PM by bill

The one thing I find very annoying with VB.NET is the extreme verbosity compared to C#.

Admittedly, the VB IDE appears to be better than the C# IDE in VS.NET but I must argue that if one bases one's choice of language on the IDE alone, it is a biased choice.

I for one prefer C# because of its simplicity, clarity, and lack of verbosity as opposed to VB.NET. However, organisations which choose VB.NET IMHO do so because of one overriding requirement: -

1. The need for developers with suitable skillsets. C# is good for those with C, C++ and/or Java background. This being so because of the need for maintanence and extending the code over time.

That is the case in my organisation as there is a dearth of C# programmers. That is not an indictment against C# per se. I have been coding with C# since beta 2 and now I am coding in VB.NET. The verbosity is mind-numbing in VB.NET

# re: Eloquence of language

Tuesday, June 29, 2004 8:08 PM by bill

Isn't that the point? The more verbose it is, the easier it is to understand code and maintain it...

# re: Eloquence of language

Tuesday, June 29, 2004 9:35 PM by bill

And about Delphi?

Delphi is a good choice. Borland is always focused on developer's needs and on evolution. VB.Net wasn't an evolution, it changed everything.

Delphi is a continuous evolving language, with object orientation suport and strong types much before VB, and it's also easy to understand.

# re: Eloquence of language

Wednesday, June 30, 2004 6:17 AM by bill

VB.Net 2005 makes use of { }

What's more annoying than the break in C#, is how you can't fall through in VB.

# re: Eloquence of language

Wednesday, June 30, 2004 8:29 AM by bill

Ever seen an "obfuscated VB" contest? No, only C based languages.

Does any vendor of VB debugging tools run an series of ads, well into the thousands of them, all with different hard to spot bugs (no only c based languages? Besides, what VB debugging tools?

Did Andrew Koenig write "Traps and pitfalls of VB?" No, he only wrote it for C languages.

Basically, smart people prefer VB. Dummies like saving keystrokes (what they really like is being cryptic, we know). Or as Anders said, "lifestylers".

# re: Eloquence of language

Wednesday, June 30, 2004 11:31 PM by bill

blanket statements are the sucks.

# re: Eloquence of language

Thursday, July 01, 2004 4:54 AM by bill

True, blanket statements are always wrong.

But in this case, we have a blanket exemption to your blanket statement.

# re: Eloquence of language

Thursday, July 01, 2004 2:31 PM by bill

In my opinion, there are two factors that may influence language choice. First is personal preference. Second is the first language learnt by the programmer.

You can draw parallelism between programming language and natural language. If you're speaking one of European languages, you won't find difficulty to speak other European languages, since nearly all of them were derived from Latin. But, try to learn one of East Asian languages, such as Japanese or Chinese. That's a different ball game.

So, I guess Bill's argument that students who learnt C-style language is unable to evolve, is too superficial.
To me, VB is atrocious, because my first language was Pascal and it's kind of irritating to me to use a language that doesn't use semicolon to terminate a statement.

Commenting Anand's statement saying that "the more verbose it is, the easier it is to understand code and maintain it..."; I shall apologize to say VB is too descriptive that sometimes it is even hard to fathom why I have IsNull & IsNothing at the same time (VB 6).

Anyway, this is just my biased opinion because I don't speak VB natively. But every now and then, I found myself more productive, less error-prone, and more capable of maintaing codes written in C-style languages; including C, C++, Java, and C#.

Maybe if there is an OS written in VB in the future, I will try hard to get my head on VB. But before then, long live C#. ;)

# re: Eloquence of language

Friday, July 02, 2004 12:53 PM by bill

A Gunawan,

<quote>
I shall apologize to say VB is too descriptive that sometimes it is even hard to fathom why I have IsNull & IsNothing at the same time (VB 6).
</quote>

By IsNothing, I assume you mean Is Nothing...

How is that hard to fathom? VB 6 distinguishes between (DB) Null and 'no object assigned'. Its hardly rocket science to understand the distinction.

# re: Eloquence of language

Friday, July 02, 2004 9:01 PM by bill

Because I came from a language that only distinguishes null and NOT null. So, I can never understand the reason why we need to distinguish Nothing, Null, and something. I can't see the difference between 'No object assigned' and 'Null object assigned'; unless of course, you can enlighten me with a clever reasoning to why this VB system is better than "null" and "not null" only system. ;)

# re: Eloquence of language

Sunday, July 04, 2004 8:09 PM by bill

Gunawan,

The difference between Null and Nothing in Vb6 is equivalent to distinguishing between a variable that has never been assigned versus a variable that was assigned the value of null as returned from a database column.

How else would the 3 possible states - not assigned, assigned a dbnull value read from database and assigned a valid value (from DB or otherwise) be distinguished?

BTW, even variables in C# seem to need this feature as also the CLR which is why a new type "DBNull" has been introduced to distinguish between the 3 states.

Vb.Net has renamed isNull to isDBNull to clearly indicate what the function does.

# re: Eloquence of language

Monday, July 05, 2004 4:18 PM by bill

A Gunawan,

<quote>
I can't see the difference between 'No object assigned' and 'Null object assigned'
</quote>

There is no such concept as 'Null object assigned' in VB 6 (or VB.NET).

As I said Null in VB 6 is based on DB Null. If you have a smallint column in SQL Server, and its value in one row is Null, then VB 6 (via a DB access tech like ADO or DAO) will say the value of the Field is Null. The Field is not Nothing (I mean, there is a Field object there), but it has a VALUE of Null.

In other words, in VB 6, an Object / Variant variable can have no object assigned to it - which is Nothing. Or a Variant variable can have the value Null - which (almost always) represents 'no value in the DB.'

Of course, the TERMINOLOGY may be confusing if you are used to a language which uses NULL the way VB uses Nothing. But the CONCEPT of Null vs Nothing in VB 6 was quite handy. The usefulness of the concept is illustrated by the existence of Nullable Types ( http://nullabletypes.sourceforge.net/ ) and their introduction into VS 2005.

<quote>
I shall apologize to say VB is too descriptive that sometimes it is even hard to fathom why I have IsNull & IsNothing at the same time (VB 6).
</quote>

I hope I have helped you in your quest to understand the distinction between the two. Despite the way other languages use the term, IsNull and Is Nothing are completely unrelated in VB 6, and are both very useful.

# re: Eloquence of language

Wednesday, July 14, 2004 9:01 PM by bill

>> To me, VB is atrocious, because my first language was Pascal and it's kind of irritating to me to use a language that doesn't use semicolon to terminate a statement.

Funny, the first language I learned was Pascal (Turbo), and I *can't stand* to use semi-colons on the end of a line! To me, they are always getting in the way. I ask myself; why do I always have to put a semi-colon at the end of the line and then not use one in the relatively rare cases where I am continuing a line? Why not the other way around? (like in VB...?)

Actually, VB.NET has a lot of things that drive me mad too (like parens for array subscripts and lots of other nigglets.) Ideally I'd love to design my *own* language syntax and do it exactly the way *I* want it to be, but that of course doesn't pay the bills and I doubt anyone else would use my language anyway, so chalk that up to "nice idea that will never happen!" :-)

# C# ... has some pre Neanderthal form of language...

Tuesday, July 27, 2004 11:54 PM by TrackBack

C# ... has some pre Neanderthal form of language...

# re: Eloquence of language

Wednesday, July 28, 2004 11:10 PM by bill

Wow another C# bashing..... Anyway ... So Neanderthal languages only qualifies for Standards :P

Dum dum....



# re: Eloquence of language

Wednesday, July 28, 2004 11:12 PM by bill

Oh wait ... Do I hear alot of utilities converting from VB.NET to C# ......

# re: Eloquence of language

Tuesday, September 21, 2004 12:56 AM by bill

I come from a background in vb programming and i find VB.NET simply annoying. It contains too many vb functions that at times do not function exactly as they did.

Instead of creating VB 7. Microsoft decided to create VB.NET. But instead of making it pure OO like C# they decided to retain many old VB functions. This only served to confuse the developer further.

But one thing make me like VB.NET as opposed to C#: it is more readable.

I like the descriptive nature of VB and i hate those curly brackets even though the first language i ever learned was pascal.

Then there are the C style for loops.
for(i=0, i<=10, i++).
what is wrong with for i=1 to 10? simple, efficient and readable.

Also C# programmers have a tendency to declare their variables anywhere and i have always found that annoying.

But in the end what will decide the language i use will be the code samples on the internet. Is it easier to find VB code Samples or C# code samples? Right now VB.NET has more code samples. But C# has more components.

# re: Eloquence of language

Wednesday, February 09, 2005 2:49 AM by bill

# re: Eloquence of language

Tuesday, August 02, 2005 8:16 AM by bill

I've been writing code for about 28 years now. First in FORTRAN (remember it?), then C and MASM on the early PC's. Wrote a few obscure languages like Waterloo PORT (C-Like) for awhile.

I really did enjoy writing in C for many years. I wrote a lot of good code in it, particularly some of the device-level stuff I did. Heck, I even did some applications-level work with it.

More recently, though (about 8 years ago) I discovered VB. At first I thought "you got to be kidding" - back to BASIC? However, it was the availability of VB (version 3 originally) that got me into Windows programming in the first place.

Even VB.Net with all the changes is, IMHO, a much better choice than C# is. I can think about the problem at hand with it far better than I can with C#'s obscure dialect. Someone said that VB is more verbose than C#. Maybe --- but it ain't by much. Further - I HATE the case-sensitive nature of C#. Why the heck do we need X and x? Fubar and FuBaR?

In the shop I'm in, I'm in the minority. All the "hot" new developers want to program in C# because that's what "the big boys" say is the thing to do. I never listened to the "big boys" ... I AM a big boy. I'm more interested in solving the problem at hand with a tool that doesn't require that I be an expert in language features that shouldn't concern me. At my age my brain would rather concentrate on the solution than on struggling with the tool. VB makes that possible.

C# ... OK, it's cool. Use it. As for me, I'd rather turn the key to start my car than to spend time under the hood figuring out how the starter works! I'll already be at my destination while you are still figuring out how to start your car!

-CB