Jump to content
Science Forums

VB vs. C Wars


Recommended Posts

B)

 

I won't say VB is a "toy" language--heck my company's program was until recently built in it (we've converted to C#!)--but I tell you its more verbose and its structure can drive one nuts.

 

Why must I have a statement separator (":") if two statements are on one line but I have to get rid of them if I insert a carriage return?

 

I much prefer statement separators (";" and "{}") that are concise and work consistently...

 

I can go on... But if you really want to open a VB vs. C++ thread, be my guest! (Let's not muck this one up!)...

 

WellIknowtherereallyisn'tanypointtohavingseparatorsortoworryaboutanyhumansbeingabletoreadanythingright?Imeanc'monlineseparatorsareoverated.REALprogrammersdon'tneednostinkin'readability!Andwecertainlywouldn'twantthe businessuserstobeabletounderstandit.WhoKnows?!Theymightevenstartcontributingtowhatwaswritten!WhataScarythought!

 

{Besides;I;really;like;typing;alot;of;unnecessary;semicolons;}{I;realize;compilers;have;only;been;around;for;50;years;or;so;so;really;I;should;just;accept;that;I;have;to;work;around;the;computer;instead;of;it;around;me!;}

 

{you;know;now;that;I;think;about;it;I;really;have;to;much;time;in;my;day;}{I;am;glad;that;C;and;other;languages;afford;me;the;opportunity;to;excercise;my;brain;and;have;to;keep;47;nested;braces;matched;up;in;my;head;}{It;is;such;a;perfectly;natural;thing;to;do;and;now;that;I;thinki;about;it;,;it;really;adds;to;the;REAL;content;of;my;application!;}

 

NOT!

 

[Edit: the above really is spelled correctly. Even the poor computer can't handle that much schtuff strung together]

 

And while we are on the subject. Let's talk about memory cleanup. *hears the general audience wonder:* "What's that you say?" Exactly! Memory cleanup is something none of us should have to worry about. It is purely an artifact of a lazy compiler writer. If a programmer creates an object when he walks into a function, then destroy it when the stack gets popped. I realized that's over simplified. But programming should be as easy and varied as English composition.

 

The most damaging phrase in the language is "We've always done it this way"

- Grace Hopper

developer of the COBOL language

 

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration, B)

Buffy

 

Most software isn't designed. Rather, it emerges from the development team like a zombie emerging from a bubbling vat of Research and Development juice. When a discipline is hugging the ragged edge of technology, this might be expected, but most of today's software is comprised of mostly 'D' and very little 'R'.

-Alan Cooper

author of Visual Basic

 

"It is an accomplishment to make something foolproof,

because fools are so ingenious.

- N. Kohn

Link to comment
Share on other sites

My Edsger Dijkstra beats your Alan Cooper any day! :girlneener:

 

 

Amen Sister!

 

I was SO bummed to learn about him only from his obituary. I had lived in the same town with him for years and he had open Wednesday night sessions at his house that I did not know about. That's one of the greater disappointments in my life.

 

If we wish to count lines of code, we should not regard them as "lines produced" but as "lines spent": the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger.

- Dr E W Dijkstra

UT AI Professor

 

The question of whether computers can think is like the question of whether submarines can swim

- Edsger Wybe Dijkstra

 

 

PS :rolleyes: I realize I am new here, so for anyone confused, I happily present points and quotes for either side. My goal is an objective understanding where possible. I am an ENTP with an NF bent for anyone up on Meyers-Briggs

Link to comment
Share on other sites

 

Linked Lists > ReDimed Arrays ( && != to boot!) :girlneener:

 

LALR, :rolleyes:

Buffy

 

Which is why they added objects and a dot(.) convention to VB 4.0 twelve years ago. I only use arrays for fast prototyping. Generally I would prefer to manipulate a full system object such as a database, table, Excel range, timer, gui widget etc.

 

OOP > Linked Lists

 

Hashing = Magic

 

"Any sufficiently low technology is indistinguishable from Corporate Policy"

Link to comment
Share on other sites

Exactly! Memory cleanup is something none of us should have to worry about.

What a great statement proving beyond reasonable doubt:

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration

 

VB coders is how you get Vista!

Link to comment
Share on other sites

Just as a point of record: Being one of those "mentally mutilated programmers" who learned Basic at the age of 10 and have since learned 41 other languages in my 41 years; I have found C and its derivatives to be the least user friendly and understandable of all of them. Well maybe with the exception of ART-IM. But that includes Assembly 6502, 6809E, IBM BAL, and even APL (assuming you can read Greek) that all make more sense to look at than C and all its curly brackets :shop:

 

And related to the quote I have a degree in CS where I had no trouble learning everything from caches, hashing, encryption, buffering, paging, linked lists, structures, OOP, databases, b-trees etc.

 

In fact case in point: in our data structures class we were implementing Karno Map matrices and during a similar debate as this (between Basic and Fortran) a classmate bet me $20 I could not implement the project in Basic on the mainframe. I took him up on it.

 

At the end of the project the teacher was giving out an award for fewest lines of code to implement the assignment. The rest of the students ranged from 450 to 1400 lines of code (the poor child on the 1400 lines just really did NOT understand the concept of recursive functions). I turned in 155 lines of code with comments. So I got bonus points with my $20 ;)

 

Drinks were on me that night...

:) :)

 

It's not any language's fault that there are bad self taught programmers in the world. In fact it is a testament to the language that it can handle all comers!

 

Life is simpler when you plow around the stump.

- An old farmer's advice

Link to comment
Share on other sites

Oh noooooooo! my post, aaaaaah, why, why did i have to close my browser..... AAAAAAgh!

 

Ok, appreciate your background, although i can not see anything extra special in it, i'm up to 26 maybe more that i can't remember at 21, don't have a CS degree, but i have written caches, hashing algorithms, encryption (including both syphers and pub/priv key), buffering, paging, linked lists,databases, trees of all sorts, job managers, and actually about to write a FS. Have submitted projects that in 12 lines did the same thing as 4-5 pages of code of all the other students did, and have done enough recursion... etc... That's per me, i'm sure Buffy will laugh when she reads this, i know that she's written compilers, and wouldn't be surprised to see an OS or two under her belt :).... Point ofcourse being that most of the people participating in this debate have solid credentials to their claims (at least most of the time)

 

I disagree on this topic on it's lowest level, you simply can't compare C to VB, you are comparing a low-level language that was developed at the dawn of the computing era, to a high level language written by lazy programmers when the sun was already high in the skies... You would have a better discussion comparing VB to Python or C to Delphi, but not VB to C, there simply are too many applications of C that VB can not possibly fulfill in it's wildest dreams! The reason that C is still around (here meaning C and C++), is because there is nothing that can replace it. The closest thing to C that has a better synthax (in my experience anyways) is Delphi, but it does not have any decent compilers on any non x86 non win platform, so it's very limited in application, but it definitely solves your curly braces annoyance...

Link to comment
Share on other sites

Just as a point of record: Being one of those "mentally mutilated programmers" who learned Basic at the age of 10 and have since learned 41 other languages in my 41 years;

Cool! :graduate: :cheer:

 

But....

I have found C and its derivatives to be the least user friendly and understandable of all of them. ...that all make more sense to look at than C and all its curly brackets ;)
You prove my point, dear! :)

 

There are a bunch of completely idiosyncratic things about the design of the language that go straight back to the fact that it was designed for punched-cards/tty's-with-paper-tape. Line breaks being a statement separator requiring a line extension character and colons being required for multi-statement lines, no required loop closing tokens, all go back to this. For a compiler writer they are *totally sucky* (that was what my joke about LALR was above), and they insidiously build into programmer's brains an "exception-driven" attitude toward syntax.

 

The fact that you think APL is logical is more proof! :hihi:

 

My first program was in Basic too, but I hated it and quickly migrated first to Pascal (whence Delphi was derived) and then C. These are languages that are fully normalized in their constructs and encourage programmers to think more clearly about code blocks.

 

Now admittedly, Edsgar's beef with Basic goes back to the days when it had no code blocks, line numbers and :eek: GOTOs ( :naughty: :evil: ) but those of us who tinker with languages, even with objects and structured flow of control, its still the poster child for how *not* to design a programming language.

 

You can complain all you want about how its been "fixed" (and as I said, I've spent a lot of time with it, but consider that there's more code out there in VBScript than in VB! You should really be using that as the model for comparison!) but until you can see why it really is inferior, you're going to have blinders about how languages ought to work.

 

So...

And related to the quote I have a degree in CS where I had no trouble learning everything from caches, hashing, encryption, buffering, paging, linked lists, structures, OOP, databases, b-trees etc.
I have no doubt about that, but I sure hope you don't have to ever create a yacc-able syntax: I will pity your users. :evil:
i'm sure Buffy will laugh when she reads this...
:rotfl:
The closest thing to C that has a better synthax (in my experience anyways) is Delphi, ... but it definitely solves your curly braces annoyance...
I prefer C to Pascal/Delphi precisely because of the curly brackets: they are economical (one key) and make squinting to see what your code is doing so much easier.

 

Did you know that vi had a "showmatch" option 25 years ago? And it worked with both C brackets and Lisp parentheses. Try that with an arbitrary "then" or "while" with no open block token!

 

Do you like my naturally curly code? :cheer:

Buffy

Link to comment
Share on other sites

Oookay...so what's the result of this debate? Seems to me none are happy with neither C nor VB...?

Too many negatives Tormod! You're obviously confused!

 

C is beee-you-ti-ful! Basic is totally sucky!

 

No question! Everyone agrees except for those folks who insist on saying that that ratty old rag of a blanket is the best blanket in the world because its *their* "blankie!" "Hey, its got my *drool* all over it, how could it not be loved?"

 

On the other hand this C blanket over here has high heat retention and allows 8 grams/hour of moisture release! Proof positive!

 

language : declaration statement; :graduate:

Buffy

Link to comment
Share on other sites

"But, I LIKE the cookie." Hammy

 

 

My favorite computer language has always been the one I was using at the time. Unlike YOU STUDS, I have only mastered six languages over the years. That's right, 6: TI960 Assembly, PDP11/75 Assembly, FORTRAN, C, VBA and Perl.

 

I gagged on COBOL :cheer:, APL :graduate:, C++ :naughty:, and Ada :rotfl:.

 

I did okay on Java :cheer: but never enough time to climb its rather steep learning curve.

 

I built a 25,000 line custom compiler with linking loader in FORTRAN for the Space Shuttle Simulators--used arrays to create my own linked lists, rings, hashes, etc. That was actually a blast. But if I had to do it TODAY, I wouldn't use FORTRAN. In 1984, it was the best available to me.

 

Now, my favorite language is VBA. Every criticism you guys have expressed is entirely true and valid. It is a sucky language. But the things I can do with it in Excel spreadsheets make me the local "God Emperor of Dune" for spreadsheet analysis. I have the entire language (well, the part you would want to actually USE) encoded in a 14 page cheatsheet I carry around.

 

My biggest problem is that as an aerospace engineer, I can't do programming all the time, or even enough to justify learning a lot of new languages, or even staying "in the zone" on the ones I do know.

Link to comment
Share on other sites

hey pyro, any way you can post a pdf of the cheat sheet (so i can download it on my iphone, in case i ever need it)? :graduate:

 

I lied. :naughty:

 

It's 20 pages.

 

This is two chapters of a much longer work on Excel that I have written over the last many years. Use it all you like, and give me feedback.

 

But please don't pass it on as your own. Pyro.

Link to comment
Share on other sites

Oookay...so what's the result of this debate? Seems to me none are happy with neither C nor VB...?

 

I honestly didn't expect there to be a conclusive result on this one. I've been having this debate since 1986 and it really hasn't changed. There are those that want to use a mouse all the time, and those that want to use the keyboard all the time. And the two camps really don't get the other guys reasons.

 

But hey... the keyboard/type ahead guys write spectacular device drivers and the mouse guys write really slick interfaces. So it's a good thing we have both.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...