- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Admin
Here's my two cent's worth on the C vs VB coding styles.
Now, finally, a few years after being dragged kicking and screaming into the C syntax world, I too prefer the C syntax style.
However, there are a couple of things about it I do not like. VB's verbosity actually makes code reading easier via really useful visual clues.
For instance. You are many, many lines of code cown into the listing. Which gives you a better idea of where to insert a "break;"?
Or
When the closing "}" is many lines away, and if you are having to rely on accurate indentation to find the opening "{".... VB Wins in this one. The IDE can help with brace matching highligting, but only so much. You still end up scrolling up and down.
SECOND:
I still hate the fact that my object reference is a VARIABLE number of places into the statement. It's in a different place each and every stinking time! It makes quick scanning impossible:
Or
All my variables or object refreence names begin in a neat, easily scanable straight line in the same position - col 5.
I hate that my eye has to determine where in each and every line the object reference is actually found. "It's here, no over there, wait, no there it is..."
VB syntax, "Ok. I got myMap, strThis, x and thisConn to work with..."
Admin
Wow. I had no idea your comment was on the record already! Exactly what I was saying. ;-)
Admin
You're doing it wrong.
Admin
The Real WTF is VB
Admin
Hey! That is not VB code, it is Scala code!
Admin
[Insert any anonymous function here.]