Jump to content
Science Forums

VB vs. C Wars


Recommended Posts

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

Grab FireFox. It warns you when you are about to close extra work. I quit having those problems after I got it :shrug:

 

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 :phones:.... Point ofcourse being that most of the people participating in this debate have solid credentials to their claims (at least most of the time)

 

Sounds like you are on the same path. I too had done those things by 21. Though I am impressed you manged to learn all that somewhere other than a CS degree! I piled on most of those other languages before the age of 25. Since then it has been mainly coasting. Just reusing what I had already figured out. Hmm which inspires me to start a new thread ;)

 

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.

 

I meant the modern forms of C, just like I mean to compare the modern forms of basic. But my key issue is the base syntax for both has never changed. To me one reads like english and the other... well ok the other deciphers like C. But hey at least it's not Cobol! ;)

 

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...

 

And here here on Delphi! I think it's something we can all agree on. I never understood why it didn't take over for both camps. Maybe because the learning curve is a bit prohibitive for the self taught coders, and can't do all the things that C can.

Link to comment
Share on other sites

Cool! :phones: ;)

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 created a 6809E Assembler/Disassembler in Basic when I was 16, written out to a cassette tape drive, does that count? ;) I certainly had no complaints about it, but then I don't know too many users that enjoy perusing the ROM of their machine :shrug:

 

I honestly had never heard of yacc till now, but it sounds like a rather unpleasant thing to do ;)

Link to comment
Share on other sites

I honestly had never heard of yacc till now...
Well, that sure explains a lot! :sun:

 

but it sounds like a rather unpleasant thing to do :doh:
Actually, its quite fun! And its a heck of a lot easier to use yacc to parse complex input than writing a parser from scratch! However you will end up having to use C, since that's what most yacc implementations spit out....

 

Of course if you're trying to parse *Basic* then you're gonna have to do lots of manual multi-token look-aheads! Now *that's* unpleasant! :evil:

 

Lex 1, parse 2, lex 1, parse 2, :rainumbrella:

Buffy

Link to comment
Share on other sites

I knew BASIC and z80A assembly back in the day (early-mid 1980s). I then moved to Pascal and 8088 assembly...but after 1990 did virtually no programming (didn't mix too well with a busy music study schedule). After 1996 I began developing web applications in ColdFusion which to date is the only thing I "master" :rainumbrella:. I have written a single web app (a custom CMS) in ASP (pre-.NET) and done some PHP hacking (it disgusts me how difficult it is when I know how fast I can do it in ColdFusion).

 

But I think I'd like to take a crash course in Java...one of these days...or years... :sun:

Link to comment
Share on other sites

I created a 6809E Assembler/Disassembler in Basic when I was 16

Lol, i wrote a CMS in PHP and i was writing a kde-like front end for windows in Basic (stored on a floppy and backed up on another one, my backup failed, and someone (and i know who) stole my floppy) but i had the login down, the desktop, the menu poping up and i was working on submenus....

 

Grab FireFox. It warns you when you are about to close extra work. I quit having those problems after I got it
I know you haven't been on these forums much, but:

I dont use IE

I dont use Office

I dont use Windows

 

I have been with FF since before v1.0 infact since their first beta release and i have converted more people to FF then the 2 page Firefox ad in the New York Times, by the way my name appears on that add, i also have a firefox 1.0 t-shirt, and have participated in the firefox challenge back around 1.1... thinking about their new one, on pitting the firefox sticker on a building (a big firefox sticker :) ) I have also ultered the inner working of FF, for my kiosk project, altering menus, deleting functionality and right now probably have the most hacked version of FF out of all the people on this website.... so yeah, i just hard quit it from another desktop, by accident, that's all

 

I meant the modern forms of C
like C#? that's not even what i consider a form of C, because it is so Microsoftastic that its C not, not C sharp.

 

All the other forms have been around since dinasours and floppies roamed the Computer world.... lets see when was ++ released.... lets see, if i can remeber.... around 79 (well, C with Classes as it was called back then), and don't let me lie here, but i think it was 83 or 84 when it was renamed to C++, but you'd have to check. Remember this is the time of Lisp, Fortran and C, none of which were simply typed languages, and all had annoyances...

 

Delphi never took off, because its a proprietary language that is only available for windows.... if they OSed it waay back when, it would be a lot more popular today!

Link to comment
Share on other sites

 

Actually, its quite fun! And its a heck of a lot easier to use yacc to parse complex input than writing a parser from scratch! However you will end up having to use C, since that's what most yacc implementations spit out....

I use most anything at hand to parse data. Basic, SAS, Rexx, Regular Expressions. But in general they all end up being something I can hand off to a business user and be able to explain it's operation in 1-2 minutes.

 

Of course if you're trying to parse *Basic* then you're gonna have to do lots of manual multi-token look-aheads! Now *that's* unpleasant! :turtle:

Yes and one I have never had to do. That is the purpose of the development environment. Unless I am trying to design an alternate compiler, I can't imagine a reason to parse Basic.

 

Though I did go in and look at the tokens once just to understand what it was doing underneath the covers for me.

 

- Well unless you were trying to analyze or profile the code itself. Which I have done with other languages like Aion. But in those cases I fed the results directly into a database for analysis. (Number of functions, rules, classes, hierarchy, uses, used by, etc)

Link to comment
Share on other sites

  • 2 weeks later...
You're projecting dear. I know you just *love* Basic...

Actually I only like Basic. I *love* Rexx, Neugents, and Aion (an expert system derivative of Pascal). I liked what LISP could accomplish but all those parentheses always hurt my brain. I would rather spend my time worrying about coding for the domain rather than the syntax I was writing it in.

 

Basic does use carriage returns as a statement separator. They also thus require the use of underscores to do continuation lines and they require colons to separate multiple statements on a single line.

 

Three different characters you have to remember and apply differently where every other language mentioned in this argument uses.....one....the lowly and beleaguered semi-colon.

 

Now which is simpler?

Generally in the course of a 50-200 line function I will have 1-4 really long lines that require the continuation character. So I'll use from 1-10 underscores. I personally don't know anyone who likes to jam up more than one command on the same line. It makes things difficult to read. In the three decades that I have been coding various forms of basic I have only put more than one command on a line about 3 times. Ditto for any other language now that I think about it.

 

So in the same function how many semicolon's do you think Cxx would have by contrast?

 

Since you didn't take my gentle hints before, I guess I have to say it explicitly:

 

If you haven't written a real compiler--or have at least studied how they work--you really don't know a thing about computer languages, and you should be careful with the stridency of your arguments about what's "good" and "bad" concerning their features.

Well believe it or not, I do know a thing or two about compilers. Which is probably the main reason why I ignored your various well intended derogatory comments regarding my coding experience... er "hints" :) Compilers, Operating Systems, Assembly Language, Database Structures etc are all required courses for a CS degree. So in my compiler class we wrote our own Rexx compiler. It taught us about lexical analysis, semantic analysis, and recursion etc. Granted mine was a multi-pass compiler. I had ideas on how to change it later to make it one pass but never had time to finish it up. It sounds like you may have written a full fledged compiler and therefore would know more of the pitfalls, but I am at least familiar with the issues involved in recognizing when a coding phrase has completed.

 

But the key issue is that Rexx programmers never have to use a semi-colon. It recognizes what operator needed what arguments and processes accordingly (recursively where needed).

 

Oh and I also wrote a 6909E assembly decompiler at the age of 16 (in Basic ;) )

 

You ought to *love* programming in Whitespace, :shrug:

Buffy

Yeah that seems to take the cake for obscure languages. It sounds a bit like the programming equivalent of body language. ;) It seems pretty cool that you could put one language inside of another.

Link to comment
Share on other sites

In the interest of fairness maybe someone would like to post a list of the platforms supported by each language :shrug:

 

In hindsight I'm wonderin', "How many platforms are not supported by C?" I suspect this list might enable VB to be more competitive in the comparison :)

Link to comment
Share on other sites

Actually I only like Basic. I *love* Rexx...
...that's the point Edsgar was making.... :rolleyes:
Generally in the course of a 50-200 line function I will have 1-4 really long lines that require the continuation character. So I'll use from 1-10 underscores. I personally don't know anyone who likes to jam up more than one command on the same line.
I'd ask you to do the math: you have to remember it every time you use it, you use it in just about every routine you write, and you use it infrequently enough that you probably forget it every one time in four, having to rely on the compiler to find/catch it!

 

I've rarely waded through Basic code doing what you probably do: breaking up those repetitive blocks of single-line IF statements that have multiple statements in the then clause that have to be separated by colons, and having to remove them. Oh and remember to put an END IF after it which you can leave off of a single-line IF! :rolleyes:

 

I *strongly* applaud your good formatting, but most every Basic coder I know *loves* to put multiple statements in a single line (IF being one of the primary motivators).

 

C coders love it too, in fact its encouraged:

for(i=0,j=100;i<100;i++,j--) 
    p[i][j] = m[i][j] * n[j][i];

So in the same function how many semicolon's do you think Cxx would have by contrast?
Its under my right pinky. Its got to be at the end of every line, so finding one that's missing is easier than finding the one line that--solely because its not a complete line--needs an underscore.

 

Its pretty obvious though that your irrational hatred of semi-colons will not succumb to logic, however as I've emphasized many times around here, language preference is a religious issue, and for most, logic is irrelevant. So in the interests of maintaining decorum, its necessary to ignore any of these logical arguments on this topic.

 

So you win! Your superior training and experience uniquely qualifies you to deem that the rest of us are all blithering idiots! :xx: :cheer:

 

From here on out, anyone who discusses C++ in a positive light will have to wear the Symbology Semi-Colon Dunce Cap and sit in the corner for 24 hours!

 

C++ is a great language!
/forums/images/smilies/banana_sign.gif

:stupid:

 

It is nobler to declare oneself wrong than to insist on being right - especially when one is right, :phones:

Buffy

Link to comment
Share on other sites

...that's the point Edsgar was making.... :rolleyes:

I'd ask you to do the math: you have to remember it every time you use it, you use it in just about every routine you write, and you use it infrequently enough that you probably forget it every one time in four, having to rely on the compiler to find/catch it!

I looked up the full quote. Dijkstra seemed to have a problem with most all languages on the mainframe. Do you know which language he thought was not so flawed? Got any quotes on it?

 

FORTRAN --'the infantile disorder'--, by now nearly 20 years old, is hopelessly

inadequate for whatever computer application you have in mind today: it is now too clumsy, too risky, and too expensive to use. PL/I --'the fatal disease'-- belongs more to the problem set than to the solution set. 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. The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence. APL is a mistake, carried through to perfection. It is the language of the future for the programming techniques of the past: it creates a new generation of coding bums.

 

I've rarely waded through Basic code doing what you probably do: breaking up those repetitive blocks of single-line IF statements that have multiple statements in the then clause that have to be separated by colons, and having to remove them. Oh and remember to put an END IF after it which you can leave off of a single-line IF! :phones:

 

I *strongly* applaud your good formatting, but most every Basic coder I know *loves* to put multiple statements in a single line (IF being one of the primary motivators).

I guess you and I hang in completely different circles of Basic coders then. I attended the VB Special Interest Group of Houston for many years. From what I could tell they led the city and state in development. Fred Thorlin actually seemed to have a pretty direct impact on MS itself. I'm querying him to see what his experience was. But in all my years there no one every put up multiple lines on the overhead for a code demo.

 

C coders love it too, in fact its encouraged:

for(i=0,j=100;i<100;i++,j--) 
    p[i][j] = m[i][j] * n[j][i];

 

vs

For i = 1 to 100
    For j = 100 to 1 Step -1
         p(i,j) = m(i,j) * n(i,j)
    Next j
Next i

I am beginning to see the age old debate I think between readability and saving the programmer typing. Because I will have to admit my version took up 3 extra lines. Though if you present both to your local MBA I'm betting he is going to understand the 2nd one alot easier. Then again he may not understand either... sigh. I dream of a syntax where it self documents and is understandable by everyone.

 

Its under my right pinky. Its got to be at the end of every line, so finding one that's missing is easier than finding the one line that--solely because its not a complete line--needs an underscore.

Thank you! I think you have helped me figure out my deep (irrational) psychological wound! I remember very clearly the absolute frustration of my very first hour of high school when I was in my first home room class (Typing). And I kept trying to hit L and kept hitting the semicolon instead. I kept thinking to myself "what kind of sadist thought to put that useless key there?!"

:stupid:

 

Its pretty obvious though that your irrational hatred of semi-colons will not succumb to logic, however as I've emphasized many times around here, language preference is a religious issue, and for most, logic is irrelevant. So in the interests of maintaining decorum, its necessary to ignore any of these logical arguments on this topic.

 

So you win! Your superior training and experience uniquely qualifies you to deem that the rest of us are all blithering idiots! :xx: :cheer:

 

From here on out, anyone who discusses C++ in a positive light will have to wear the Symbology Semi-Colon Dunce Cap and sit in the corner for 24 hours!

 

C++ is a great language!
/forums/images/smilies/banana_sign.gif

:xx:

 

It is nobler to declare oneself wrong than to insist on being right - especially when one is right, :cheer:

Buffy

 

LOL!

A very beautifully executed judo move!

:rolleyes:

 

And I agree. This debate has gone the same way as all the prior language/religious ones before it. I just look forward to the day when some newer language/religion gives us both what we want.

 

The surest way to corrupt a youth is to instruct him to hold in higher esteem those who think alike than those who think differently. :phones:x2

Link to comment
Share on other sites

A new scientific truth does not triumph by convincing its opponents and making them see the light, but rather because its opponents eventually die, and a new generation grows up that is familiar with it

- Max Planck

Physicist & Nobel Prize winner who waited 18 years to receive it

Someday we will all be gone. And as long as the code keeps working who's going to care, right?

:rolleyes:

Link to comment
Share on other sites

I looked up the full quote. Dijkstra seemed to have a problem with most all languages on the mainframe. Do you know which language he thought was not so flawed?
ALGOL 60 which was the immediate predecessor of Pascal ("Delphi" to you young'uns). The reason he liked it was that it was a true structured programming language and thus became the structural model for all the major languages to come, including C (although unfortunately not Basic, which required years of reworking by Microsoft before it became one! :rolleyes: )

 

Edsgar (and fellow language God C.A.R. Hoare) did not like ALGOL 68 though because he thought it got loaded down with a lot of extraneous concepts and took away the earlier version's simplicity. Of course among those concepts were structures, casts, and parallel processing! The thing is that while Edsgar complained a lot, he was generally right on the mark about all of his criticisms (its not that he didn't like the additions to ALGOL68, its that he thought they missed the opportunity to add them in a way that wasn't so much like bolting it onto the side). He would not promote a language simply because it was based on concepts he liked: he'd pound it for every imperfection.

 

You can learn a lot from reading Edsgar! If you want a more positive spin though, read Nicklaus Wirth...

 

You'll be glad to know though that in both ALGOL and Pascal, semi-colons are statement *separators* rather than statement *terminators* so you can leave out the semi-colon for the last statement in any code block--although both languages allow "null statements" so ";;" (or the equivalent and more common "; end") won't choke the complier whereas in Basic you get a horrible error from "::".... :rolleyes:

 

I am beginning to see the age old debate I think between readability and saving the programmer typing. Because I will have to admit my version took up 3 extra lines. Though if you present both to your local MBA I'm betting he is going to understand the 2nd one alot easier. Then again he may not understand either... sigh. I dream of a syntax where it self documents and is understandable by everyone.
Readability is in the eye of the beholder, or as I like to say when it comes to user interface design, "easy to use is not the same thing as easy to learn."

 

The "for" statement in C is a classic example of an idiom: hopelessly obscure to the uninitiated, but to any C programmer, its a pattern of character's that is read in a Gestalt manner: you just pick out the relevant elements, and because there are no extraneous characters (a notion that Edsgar was really hot on!), its *much* easier to tell at a glance what's going on *if* you are a C programmer. So its *not* about the amount you have to type, its about being able to see what's going on. Take a look at your counter example above again, but this time *squint*: the "step" clause is optional, making it harder to notice immediately, where as the decrementing of j in the C code jumps right out at you.

 

At the same time, how much you have to type does become an issue and when I read "only 3 more lines" I really hear "150% more code," but that's just my silly, irrelevant math again! :xx:

 

Now I went to B-school long enough ago that they were still telling us that as business managers we would use SQL to monitor our business (the professor got really mad at me when I laughed out loud in class when he said this! Impertinent girl with the computer science degree! Shame on you! :cheer: :xx: :evil: ), and COBOL, PL/1 and even the original BASIC used the notion that "a computer program should be English-like to promote understanding," but think about how silly it is to have someone who doesn't program looking at code! (That professor and I actually got to be good friends! :phones:)

I guess you and I hang in completely different circles of Basic coders then. I attended the VB Special Interest Group of Houston for many years....
99% of coders do not go to Language SIGs or conferences, but the ones that do tend to be conscientious programmers, so I'm not at all surprised by this.

 

I always ask for coding samples along with resumes, and I've got *stacks* of ugly code that was chosen *specifically* to impress a potential employer! and even our own code is filled with blocks like:

if (condition1) then statement1 : statement2
if (condition2) then statement3 : statement4
if (condition3) then statement5 : statement6
if (condition4) then statement7 : statement8
if (condition5) then statement9 : statement10
... ["conditions" not mutually exclusive]

:eek:

 

Again, this kind of formatting actually *improves* comprehension of code but *only* if you are an actual *programmer*, so it does *not* make sense in all cases to "fix" it! :stupid: (But when you do want to fix it you need to do a lot of editing instead of just putting in a carriage return! :hihi: )

 

A good designer must rely on experience, on precise, logic thinking; and on pedantic exactness. No magic will do, :cheer:

Buffy

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...