Comparing languages

snarfblam

Mega-Ultra Chicken
Joined
Jun 10, 2003
Messages
1,832
Location
USA
User Rank
*Expert*
Im tired of it. Comparing languages, that is. All the C++ programmers think that VB is the devil, and VB programmers think that C++ is impossibly difficult. Half of these people never even give the other language a chance. I use VB because it suits my needs. Not because C++ scares me. You run into people who will tell you things like C++ is simpler than VB or worse yet that it is better in every way. And its not just C++ programmers ragging on VB programmers. Here, sometimes, its C# and VB.Net. Elsewhere, its Java and ActiveX. Its PHP and ASP. Its Windows and Linux (well... that one I can kind of see). Each language and platform has its purpose, and it just seems to me that it shouldnt be too much to ask for an unbiased comparison of the two, rather than an insistence that one or the other is unequivocally better under all circumstances.

In case anyone is wondering why I made this post, this is why...

C syntax is about as simple and idiot-proof as it can get
Is it easier to make templated, carbon copy form programs in VB? yes
Is it easier to make any other kind of program in VB? definatly not.
theyre [C/C++] just superior languages
Sure -- slapping together pre-existing code to create a cookie cutter program is much faster to do in VB (thats pretty much what it was designed for)
Start with C/C++ rather than wasting time with VB before switching over.
 
man I so agree...

I use C#, not because I think it is so superior to any other language, but because that is what all of the developers where I work use and have used for 2 years. My comfort level with it has grown to the point that I dont want to go to another language.

Years ago, I did everything in perl on unix machines (web development) and at the time It was the same way...my comfort level was very high so I didnt want to change to another language. If you asked me then, I would of said that you could put a man on the moon with perl its that good. :D But, isnt that the stance of everybody "defending" their language of choice? Sure.

I think that is what is really happening here. People have different viewpoints and seem quite zealous about a particular language because that is what they are most comfortable with. Of course others will disagree, and thats why there are the comments that you quoted.

Whatever, man. Just use what you like. Have an opinion, youre allowed. Just remember, whatever you say now about how much you like a particular language or think it is superior to another...youll probably think something different in a few years.
 
Some people seem to hold their choice of language in almost religious like regard, if you do no use their favourite then you are wrong / stupid / smell funny or whatever other argument comes to mind.
Each language / toolset has its uses - I wouldnt consider a device driver a project to attempt in VB (or any other .Net or VM based language) it would require ASM / C / C++ to really be effective.
Similarly most business orientated applications do not need the speed (real or assumed) of C / C++ but will benefit from the RAD featurers of .Net / Java etc.
C syntax may be simple, pointers and pointer arithmetic on the other hand is not, the fact you require it for something as simple as string manipulation sways me from using either C or C++ unless there is no other option (Im too lazy is my problem).
The trick is to use whatever gets the job done best, being willing to change and learn new languages just adds more capabilities to your own skillset. Remeber the old adage - if you only have a hammer then all problems are nails. If you only know one language you have to solve all problems with that on language.
If you want to find a few more choice quotes on language zealotry search these forums for Delphi...
 
Each language and platform has its purpose

Marble Eater, I have read many posts from you, and you seem very knowledgeable.

If you were talking to a less knowledgable person than yourself ( which you are in me )

Would you give some examples of the types of real world applications that are best suited for VB.net?

In other words what was VB.net made to do?
 
Sorry to but in, but I think this except from an essay I read really fits this post:
Programmers get very attached to their favorite languages, and I dont want to hurt anyones feelings, so to explain this point Im going to use a hypothetical language called Blub. Blub falls right in the middle of the abstractness continuum. It is not the most powerful language, but it is more powerful than Cobol or machine language.

And in fact, our hypothetical Blub programmer wouldnt use either of them. Of course he wouldnt program in machine language. Thats what compilers are for. And as for Cobol, he doesnt know how anyone can get anything done with it. It doesnt even have x (Blub feature of your choice).

As long as our hypothetical Blub programmer is looking down the power continuum, he knows hes looking down. Languages less powerful than Blub are obviously less powerful, because theyre missing some feature hes used to. But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesnt realize hes looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub.

When we switch to the point of view of a programmer using any of the languages higher up the power continuum, however, we find that he in turn looks down upon Blub. How can you get anything done in Blub? It doesnt even have y.
 
realolman said:
Would you give some examples of the types of real world applications that are best suited for VB.net?

Ive got to be honest. I use VB because I find it to be easy, yet powerful enough to suit my needs, and I am to lazy to learn anything else. I started programming when I was little, probably about ten years old or so. From Applesoft BASIC I moved to QBasic to Visual Basic to Visual Basic.Net. The .Net framework has so many features and VB.Net has all the language features that VB6 was missing, so at this point, it seems like VB will suffice for nearly anything I want to do. Unfortunately, I have very little experience with other languages.

To answer your question, VB is probably best known for RAD. Commercial applications written in Visual Basic are uncommon, but one can quickly whip up all kinds of smaller apps in it. This is perfect for a company who wants to create apps for its own use. And with the .Net framework, there is a class for most anything you will need, minimizing the number of extra libraries you will need (this was often not the case in VB6). VB is also great for hobby programming.
 
Ill toss in my cents here...

thenerd, excellent post. I think you nailed the issue square. The problem of language superiority lies in how we think about the solutions in the language we write. I learned C/C++ first. I am extremely comfortable with memory management and pointers (even pointer arithmetic). When I first picked up VB .Net I couldnt get my head around the variable declearation concepts in the language. Once I finally figured out that all variables were really pointers in disguise, I started to understand things a little better. In the meantime, I hated VB and ended up writing a lot of VB code that is basically just like C++. Eventually I figured it out but the Garbage Collector still makes me feel really lazy.. At least C# lets you use semi-colons..

Anyway, I was biased against VB in the beginning becuase I could do really amazing things right now in C++ and I had no clue how to do the same thing in VB. It was extremely agrevating. Also, I like the curly braces and codey sytax...VB is pretty wordy.

So...I agree, to each his own and each language has its place. VB seems to be really good for UI development (C# for advanced custom jobs) and for really cranking out a lot of code fast (mmm...code completion). The avaialbe code base in .Net (and Java) is amazing (slaps the C++s Standard Template Libraries down hard). But at the same time, a real time system will still have to be done in C++ (not java or .net) at least for a few more years (VM cant hack it yet). And you cant understimate the power of a good ole Perl script...

The Pragmatic Programmer says to learn one new language every year. I think that is great advice so you will know what tools you have available and what the best tool for the job actually is. Then youll never argue about which is better again -- youll start agruing about which creates the more elegant solution...
 
mskeel said:
But at the same time, a real time system will still have to be done in C++ (not java or .net) at least for a few more years (VM cant hack it yet).
Have to disagree with you. Ive been using .NET since before it was released and I think its quite capable of handling pretty much any business application and many game genres.

Upon what are you basing your statement?
 
I think we might be talking about different things -- a small miscomunication. Theres real time and then theres REAL TIME. No offense to all the hardcore gamers out there, but no FPS online or otherwise has real time requirements. Im talking about systems that have actual requirements for real-time operation (not simply fast). Often such systems also have high availability and stability requirements. Some examples of systems that fall under this category include air traffic control systems, missile guidence and tracking systems, and navigation systems -- things that deal with a continous, high flow of data and MUST handle it as it is entered into the system. Generally speaking such a system will be running on a real time operating system such as LynxPC, though it can run on any OS and if you throw enough hardware at it, sometimes become real-time.

Anyway, the point here is that, while the CLR is great and runs nearly as fast (equally for all intents and purposes) as native code, no regular VM can meet these real time requiremetns. There are groups working towards making both .Net and Java capable of handling real time requirements, but you cannot make a real time application with the VS .net you bought off of Amazon. Currently, C/C++/ADA are the industry standards, though someday (soon) Java and .Net will become the new vogue in real time system development -- once they are a legitimate option.

.Net/Mono is not stable enough, the JIT Compiler isnt fast enough, and the garbage collector just adds to the mess. Now if you want to talk about unmanaged code, thats another story..

Im not an expert on the subject but I do deal with it often. Machaira, you are correct, .Net is just fine for games and business applications. But that wasnt what I was referring to, again, I think we were just using the same words to describe different things.
 
Just a nitpick:
VM isnt an accurate term for the CLR and with nmake, JIT compilation doesnt even enter into it.

I work for an AGV company (Automatic Guided Vehicle). We have sites with hundreds of vehicles and applications such as hospitals, newspapers, automotive manufacturers, banks(mint/vault), nuclear power(fuel handling), etc. (not quite as hardcore as missile systems but heads roll if therere any problems) In 2003 we moved to .NET (CE for the actual robots) and currently were preparing for .NET 2.0 (already running sims on BETA 2). So my point is that .NET can handle huge amounts of data and processing with 0 tolerance for failure or slowdowns.
 
mskeel said:
Once I finally figured out that all variables were really pointers in disguise, I started to understand things a little better.

When I started VB (VB6 to be specific) reference types gave me quite a headache until I started to learn C++. When I began using pointers I had quite the epiphone, and ever since, Ive had a perfect understanding of reference types. I think every VB programmer could benefit from learning some C++. It teaches you some programming techniques and concepts that are very applicable to VB. (And then again, virtuals in C++ confused me until I began using the VB syntax [i.e. overrides, overridable, mustoverride], which makes the mechanics of virtual functions painfully obvious)
 
IngisKahn said:
Just a nitpick:
VM isnt an accurate term for the CLR and with nmake, JIT compilation doesnt even enter into it.

What exactly does nMake do? I keep seeing references to a VC++ page on microsoft which talks about projects - but I cant find out what it does exactly - especially in reference to .Net
 
Denaes said:
What exactly does nMake do? I keep seeing references to a VC++ page on microsoft which talks about projects - but I cant find out what it does exactly - especially in reference to .Net

nmake (n = native) precompiles assemblies and stores that with the GAC. Any serious .NET project should include a call to nmake in the installation app.
 
IngisKahn said:
nmake (n = native) precompiles assemblies and stores that with the GAC. Any serious .NET project should include a call to nmake in the installation app.

This would be something you do on a target persons PC when they install it, not on your own PC durring development then?
 
IngisKahn said:
Correct. One of the reasons for this is that the compiler can optimize for a specific processor instead of just compiling for metapc.

Does that work (or any similar alternative) for OS X or Linux for Mono? Or is this just PC & .Net?
 
Id be surprised (but very pleased) if it did. MS spent the majority of their time working on the compiler. Maybe you can find some info on Monos site...
 
IngisKahn said:
Just a nitpick:
VM isnt an accurate term for the CLR and with nmake, JIT compilation doesnt even enter into it.
No matter which way you put it, the .Net platform is a virtual machine similiar (not identical) to the java virtual machine. The .Net platform taken on the whole is a virtual machine. Why else would it take C#/VB/C++/J#/Fortran/python, compile it into MSIL (just like bytcode for the JVM), and require that users have the .Net framework installed on their machines for it to run? Mono is just another version of that same virtual machine that runs on multiple OS platforms as it is meant to be. When you run a .Net application, you arent running it on WindowsXP or Linux, you are running it on .Net. An articulate fellow who put it quite well...second post.

nmake sounds really cool, but isnt that used mainly for C++? I know you can compile MSVC++ to run both natively and/or on .Net but I didnt know you could do that for C# and VB.

IngisKahn said:
In 2003 we moved to .NET (CE for the actual robots)
That sounds totally hard core. Its actually pretty cool that you guys are going full .Net. Ive been dong some more research on this since the topic came up and the .Net CE seems to be the way to go for real time stability etc. out of all of them (Java is a long ways off, but the articles I found might have been old). With the project Im working on they elected to use .Net C++ and compile it to native code. Becuase of the size of the project and the real time requriements. We basically take the same code and run it under the MVSC++ compiler and g++ for Solaris compatibility.

If you guys really want to compare a language that will blow your mind, take a look at Kennedy-Carters xUML. Basically, it takes a subset of UML and a "programming language nuetral" intermediate language, ASL, and you are supposed to be able to create UML models and "compile" them into programs. The whole concept is "The model is the code" so you save costs on documentation maintainence and can compile verified and validated business rules (model) into any language for any platform. Check out Model Driven Architecture (MDA) for some more info on that. Its pretty wild, but Id rather stick with strait up virtual machines for platform independence.
 
IngisKahn said:
As for the VM discussion, this is a good read: http://msdn.microsoft.com/library/?...rld06012004.asp
A good read. Thank you for sharing. I stand corrected...slightly. The whole time I was thinking managed code and really didnt think about how you can blend managed and unmanaged code -- something that is not a desirable property in a true virtual machine. Im coming from a platform independence perspective where pure managed code is good becuase then you can run it on different operating systems, etc... Something you would have to use strictly managed code for which would, as the article points out, make it just like Java. In this situation, everything I have said is true...but .Net on the whole is not that, it is the managed and the unmanaged, you have direct access to the Windows APIs if you need them. You are completely correct, where I was maybe only 1/4 of the way there.

Which brings up an interesting comparison between Java and the .Net languages. From that article... "However, many third-party Java Application Servers create a competitive advantage by judicious use of "C" function calls directly down (through Java Native Interface or JNI) into their host operating systems value-added services that are not exposed by the Java Application Platform (the Java Class Library)." So in the .Net langauges, the power is provided to make low level system calls if you choose to do so, where as in Java it is not provided at all and you must hack the functionality in with other languages. Interesting...
 
Back
Top