View Full Version : what's the difference?
hotdog
05-10-2002, 06:36 PM
some ppl are telling me that C++ and Visual Basics are the same languages in programming. can anyone tell me something else otherwise? (never used or SEEN C++ before)
-hotdog
Dark Angel
05-10-2002, 06:48 PM
I have never used Visual Basic before but have done some coding in C++ back in school (now I just code in C). Here is a definition of Visual Basic from the web...
http://webopedia.lycos.com/TERM/V/Visual_Basic.html
Sounds to me like Visual Basic similar to Visual C++ in that Microsoft does a lot of the coding for you and you can just click on the 'objects' you want. The downside of that is it is not as flexible as it would be if you were to code entirely in C++ yourself.
Witchkiller
05-10-2002, 08:59 PM
I also used C++ in school and about Visual Basic its suppose to be a little easier then C ++. I have not messed with any programming since school. But my under standing is that they are the same language. But I believe that visual basic is newer.
Just my .02
Witchkiller
morthrane
05-10-2002, 10:04 PM
No C++ and Basic aren't the same languages.
pilott
05-11-2002, 06:11 PM
Originally posted by hotdog
some ppl are telling me that C++ and Visual Basics are the same languages in programming. can anyone tell me something else otherwise? (never used or SEEN C++ before)
-hotdog
There are similarities, but they are very different languages. I have not done much with VB (some simple scripts) but I program in C++ for a living. I would be happy to try to answer any questions that you might have, or at least help you find a resource for the answers.
infrandom
05-11-2002, 08:20 PM
The same? Oh my goodness they are not.
I've programed in Visual Basic at times as well as now my current specialty (what I'm actively working in) is C++). Visual Basic is NOT at all like c++. I mean, don't get me wrong you can do similar things. Visual Basic is a procedural language. The big thing about c++ is that is an Object Oriented language. OOP (Object Oriented Programing) is a big ball of wax that you should spend some time to learn about. Visual Basic is primarily used for rapid application development. Visual Basic is Windows based. c++ is platform independant if you talk about standard c++. Of course, there are always microsoft specifc stuff for c++. Syntax is nothing a like between the two languages. So much so that recently when I had to help a friend taking a VB class in school I'd spend time looking up the simplest of syntax.
I'd be happy to explain more about the two, the differences between what Visual Basic is and C++ is too numerous to write. They each have their purpose though. A good programmer has a bunch of tools in their toolbox and knows when to use what. For example, need a simple GUI? Write the app in Visual Basic or Java, but if you need to do any serious backend work write that in C++ and tie the two together.
I could see how someone could say that C and Visual Basic are similar. They are both procedural languages. But there is a world of difference in concept between c and c++. Note that you can use c++ to write non OOP designed software (more like bastardize c), and likewise you could use c to write OOP. These are more the concepts, OOP languages directly support the OOP ideas.
The 3 main pilars of OOP are:
* Inheritance
* Data Abstraction
* Encapsulation
Ok, I'm a geek, I'll shutup now flashbacks from college can stop now... :D
Let me know if you have any Visual Basic, Java, C, C++, questions.
hotdog
05-11-2002, 11:44 PM
cool! thanks for the info! so let's say i write a program in VB6 (a lame mortgage calculator or a command button that displays "you're an @$$hole" in the picOutput :D ) and then i wanted to lay out the GUI so other users can use it within Windows, (not using VB6 to open up the Project) what then do i do? is there another software or should i just give this s*** up and start learning programming in 'C'?
-hotdog
ps. thanks for all the help! this is going to blow away my professors (and my geeky friends) when i retalliate with this kind of knowledge!
infrandom
05-12-2002, 12:00 AM
Originally posted by hotdog
cool! thanks for the info! so let's say i write a program in VB6 (a lame mortgage calculator or a command button that displays "you're an @$$hole" in the picOutput :D ) and then i wanted to lay out the GUI so other users can use it within Windows, (not using VB6 to open up the Project) what then do i do? is there another software or should i just give this s*** up and start learning programming in 'C'?
-hotdog
ps. thanks for all the help! this is going to blow away my professors (and my geeky friends) when i retalliate with this kind of knowledge!
Thanks a perfect use for Visual Basic... its quick and easy to learn to. To do that using Windows MFC or API would take a lot more code and understanding...
To make it an Exe look under the file menu... there should be a Make <Project Name>.exe
Hope that helps.
morthrane
05-12-2002, 01:30 PM
Originally posted by hotdog
cool! thanks for the info! so let's say i write a program in VB6 (a lame mortgage calculator or a command button that displays "you're an @$$hole" in the picOutput :D ) and then i wanted to lay out the GUI so other users can use it within Windows, (not using VB6 to open up the Project) what then do i do? is there another software or should i just give this s*** up and start learning programming in 'C'?
-hotdog
ps. thanks for all the help! this is going to blow away my professors (and my geeky friends) when i retalliate with this kind of knowledge!
AFAIK, VisualBasic is plenty fine for silly little windows programs, but if you want to get serious about programming in a Win32 environment, you'll want to learn C++ and the Microsoft specific API's (MFC i believe they're called)-- since pretty much everything in Win32 space is written in C++
infrandom
05-12-2002, 03:07 PM
Originally posted by morthrane
AFAIK, VisualBasic is plenty fine for silly little windows programs, but if you want to get serious about programming in a Win32 environment, you'll want to learn C++ and the Microsoft specific API's (MFC i believe they're called)-- since pretty much everything in Win32 space is written in C++
Just a technical clarification...
Windows MFC is Microsoft Foundation Classes... good stuff for Win32 Apps, gives you a lot of frameworks and building blocks.
Windows API (Or Win32 API) is a *different* API. Its the core windows API. Take much much more work to write you basic Hellow World cause you have to handle everything yourself.
Then there are a whole host of "other" windwos APIs. The Internet Explorer API, the DirectX/DirectShow (multimedia), etc. etc.
So I'll let everyone know, my biggest pet peeve is when technology is misrepresented. I dunno why, just really bugs me, so I find myself compelled to correct when I have the knowledge. I'm not trying to be the smartass. I don't know everything.
Man, the family gathering where my dad told me how great his "Digital music from digital cable was so much better." He just never got it, that while it may be digital to the cable box... he's still using analog RCAs to connect to his stereo....
pelikan
05-12-2002, 09:06 PM
VB is basically a scripting language, but microsoft built some really nice GUI widgets around the language, and besides asp that is all it is good for.
c++ is a real programming language, which is closer to c, objective c or java.
vb.net and c# are damn near identical, with only small syntacial differences. But besides that they read extacly like each other, use same APIs and compile to same bytecode.
infrandom
05-12-2002, 09:57 PM
Originally posted by pelikan
VB is basically a scripting language, but microsoft built some really nice GUI widgets around the language, and besides asp that is all it is good for.
That's not true. VBScript is a scripting language that is used for ASP (Active Server Pages) and its a subset of Visual Basic itself. Visual Basic is however not a scripting language, its procedural like c.
I've seen many a fight between C++ coders and Visual Basic ones who claim who is better. I tend to just think of VB as a tool that has uses. It is a good language for rapid prototype development and or rapid application development if the limits of VB work with the requirments of your spec.
Originally posted by pelikan
c++ is a real programming language, which is closer to c, objective c or java.
If by real you mean object oriented, more flexible, portable, faster. And by that you mean it requires much much more understanding of softeware design principals then I agree. Smalltalk, Objective C and Java are OO. C however is NOT.
Don't confuse C++ with bastardized C/C++ when you talking about the principals of the language. (Ever #include <stdio.h> in your c++ app. Bad!)
Originally posted by pelikan
vb.net and c# are damn near identical, with only small syntacial differences. But besides that they read extacly like each other, use same APIs and compile to same bytecode.
I haven't had time to investigate vb.net but I find this hard to believe. I did read a doc which sumerized the similarities and differemces of Java and C# though and so I do know that C# is more like syntacitcally renamed Java. Gotta love MS.
Now instead of "import" you say "using".. oh my.
This brings up the new issue of .net. .net is a framework -- a framework which can be used by any language for which there is an API for it ie. vb.net, c#, c++, Java.
hotdog
05-12-2002, 10:31 PM
cmdSmartAss_Click()
Dim myStatement As String
Dim inputName As String
myStatement = "is a Smart Ass (_|_)"
inputName = Val(txtTypeName.Text)
If inputName = "infrandom" Then picOutput.Print inputName; myStatement
Else: picOutput.Print inputName; "is a cool person and not a geek like Infrandom!"
End If
End Sub
*types in "infrandom" in txtTypeName.Text*
*clicks command button cmdSmartAss* :twofinger
-hotdog
infrandom
05-12-2002, 10:36 PM
Originally posted by hotdog
cmdSmartAss_Click()
Dim myStatement As String
Dim inputName As String
myStatement = "is a Smart Ass (_|_)"
inputName = Val(txtTypeName.Text)
' *types in "infrandom's" name in txtTypeName.Text
If hisName = "infrandom" Then picOutput.Print inputName; myStatement
Else: picOutput.Print inputName; "is a cool person and not a geek like Infrandom!"
End If
End Sub
*CLICK!!* :twofinger
-hotdog
:laughing :laughing
I'm very secure with my inner Geek thank you very much. :twofinger
Man, VB code is so ugly.
hotdog
05-12-2002, 10:38 PM
Originally posted by infrandom
:laughing :laughing
I'm very secure with my inner Geek thank you very much. :twofinger
Man, VB code is so ugly.
damn! you replied before i could even EDIT my own post! LOL!! anyways, if you see what you've quoted/replied to, there's some major debugging needed!
-hotdog
infrandom
05-12-2002, 10:43 PM
Originally posted by hotdog
damn! you replied before i could even EDIT my own post! LOL!! anyways, if you see what you've quoted/replied to, there's some major debugging needed!
-hotdog
Yeah, some stuff doesnt look right to me. Its not worth my effort to debug your code though!! :D
With all I've said, VB is for weenies! :twofinger
Seriously, I go such long streaches without doing VB that I have to look up simple syntax to double check my self...
Hmmm
If Something Then
End if
or
if (something)
{
//do something
}
Hmmmmmm
pelikan
05-13-2002, 09:11 PM
That's not true. VBScript is a scripting language that is used for ASP (Active Server Pages) and its a subset of Visual Basic itself. Visual Basic is however not a scripting language, its procedural like c.
You got me on that one, in my mind VBScript and VB are basically the same. Same BASIC syntax, different uses, same crap.
If by real you mean object oriented, more flexible, portable, faster. And by that you mean it requires much much more understanding of softeware design principals then I agree. Smalltalk, Objective C and Java are OO. C however is NOT.
Languages that are OO do not require a depper understanding of software design principals. It's funny to think a stronger typed language produced tighter designed code. With the exception of smalltalk any of those languages can produce procedural code and work fine. static methods for the masses.
In mind there is a clear distinction betwene languages such as c/c++/c#, java, smalltalk VS jscript, vb script, vb just in terms of strong typing alone. perl is kinda borderline, it's like c for english majors.
Don't confuse C++ with bastardized C/C++ when you talking about the principals of the language. (Ever #include <stdio.h> in your c++ app. Bad!)
yup, i sure have, lots of times, and it worked with mixed results. One of THE most powerfull things about c++ is it's ability to use legacy c libs and what not. Having the misfortune of reading Stroustrup's book cover to cover, you realize a lot of what the language spec says is not possible with any compiler (may be true now, but waaay back in 1996 it wasn't).
I haven't had time to investigate vb.net but I find this hard to believe. I did read a doc which sumerized the similarities and differemces of Java and C# though and so I do know that C# is more like syntacitcally renamed Java. Gotta love MS.
Believe it, when I get to work i'll print this basic test code I did last year, where basically the vb.net and c# literally read line for line. The use of the same APIs and making vb.net OO really blurs the line. You can even use the nice vb RAD crap via vs.net and code in the filler code with c#.
Now instead of "import" you say "using".. oh my.
the most annoying thing is they basically reversed the influx rules sun uses.
So instead of
String myString = MyClass.toString();
you have
string MyString = MyClass.ToString();
the unsafe code blocks are hillarious....
hotdog
05-13-2002, 11:46 PM
Originally posted by infrandom
With all I've said, VB is for weenies!
VB is NOT for weenies!!! :twofinger
infrandom
05-14-2002, 12:11 AM
Originally posted by pelikan
Languages that are OO do not require a depper understanding of software design principals. It's funny to think a stronger typed language produced tighter designed code. With the exception of smalltalk any of those languages can produce procedural code and work fine. static methods for the masses.
Sorry, perhaps I did not get my point accross. Your right, just because a language supports OO principals you are by no means required to use them. My point was more so, in order to write OO code your required to have a deeper understanding of the OO software design principals.
My manager anoys the crap out of me with classes where everything including data members are public. I keep urging him to drop the word class and just use struct.
Originally posted by pelikan
In mind there is a clear distinction betwene languages such as c/c++/c#, java, smalltalk VS jscript, vb script, vb just in terms of strong typing alone. perl is kinda borderline, it's like c for english majors.
When I hear strong typing I think Ada.
Originally posted by pelikan
yup, i sure have, lots of times, and it worked with mixed results. One of THE most powerfull things about c++ is it's ability to use legacy c libs and what not. Having the misfortune of reading Stroustrup's book cover to cover, you realize a lot of what the language spec says is not possible with any compiler (may be true now, but waaay back in 1996 it wasn't).
As the years go by nothing seems to ring in my mind as more important than maintainability. Good code is maintainable code. Not by you, but by anyone. Hacking code together is very unmaintainable. If its worth doing it should be worth doing right. I often struggle with this myself, but its so true.
To people who work in a team and don't follow the coding standard that group agreed upon. That's just plain freaking childish. We are supposed to be professionals. The code I write is NOT my own. It belongs to the company and it should be writen by such standards. As time goes on tollerance for crappy coders goes way down. I put a lot of effort into my code to make it maintainable and to have to fix a bug in someone else's crappy code, I take that as a big "f you" to me. For my current company I've change my { style just to conform. I don't like it, but I've learn to play nice with others.
And just because the compiler lets you do it, doesnt make it good. Maintinance Maintinance Maintinance is where a project spends most of its lifetime.
If you code for yourself, do waht you want.
Originally posted by pelikan
Believe it, when I get to work i'll print this basic test code I did last year, where basically the vb.net and c# literally read line for line. The use of the same APIs and making vb.net OO really blurs the line. You can even use the nice vb RAD crap via vs.net and code in the filler code with c#.
I'll take your word for it. Like I said, I really havent read anything about vb.net.
Originally posted by pelikan
the most annoying thing is they basically reversed the influx rules sun uses.
So instead of
String myString = MyClass.toString();
you have
string MyString = MyClass.ToString();
the unsafe code blocks are hillarious....
Sometimes I find MS and their ways humorous. Bastardizing Java is a shame, but I'm not going to just blame MS. Sun did their part to get MS away from Java. I've also dealt with enough MS JVM bugs that I wouldn't mind a few minutes alone with their JVM developers. Course, I'd really rather have a nice "chat" with the early Netscape coders.
pelikan
05-14-2002, 11:36 AM
dang I couldn't find the code, but check this chapter (http://www.bischofsystems.com/chapter2/css/48-8%20Chapter%202-2.asp) out, it bascially lays it all out.
one super-cool thing about c# & vb.net is being able to inherite across languages. too bad im in the java camp (for now).
infrandom
05-14-2002, 12:57 PM
Originally posted by pelikan
dang I couldn't find the code, but check this chapter (http://www.bischofsystems.com/chapter2/css/48-8%20Chapter%202-2.asp) out, it bascially lays it all out.
one super-cool thing about c# & vb.net is being able to inherite across languages. too bad im in the java camp (for now).
Ok, I think I know where I got confused by what you were saying. I was just talking to a co-worker about this.
When you said c# and vb.net are virtual the same I took that to mean you were saying that the language syntax is the same. This is very not true in my opinion. Even the link you sent me shows me that vb.net is still Visual Basic syntax while c# is still bastardized Java syntax.
However, the interface to the CLR (common language runtime) is virtualy the same with small syntactical differences. Of course, that's the purpose of the CLR to have a common interface to the runtime independent of language.
vb.net and c# are very different in my viewpoint from a language standpoint. But when it comes to the .net (CLR and managed code), yes I can now see how your saying the differences between them become very small. I'll have to learn more about it, just don't have the time these days and my work has not headed in the .net direction.
Out of curiousity, since you mentioned your doing Java. I ducked out of Java when the 1.3jdk was around. While generally things were good the 1.3jdk was seriously lacking for serious network programming. I don't know if you do much in this way of programming, but I've yet to talk to someone about some of the improvments that were put into the 1.4jdk. I'm just kinda of curious, we have a hardcore Java guy here at work who tried for months to say the 1.4jdk would be better, we all tuned him out though after our fustrations with Java. He's finally came on board with us c++ types. :D
pelikan
05-14-2002, 10:05 PM
yeah, the syntax is different, but basically at the core they are the same structure & confines. But your correct, the actual syntax itself is very different.
jdk1.4 didn't do much for networking IMHO, the two big improvements to the I/O package (java.nio) are mutliplexing (which is more for server side vendors) and regular expressions (yeah it's weird that nio caused it finally be included but that's where it is).
for most people 1.4 was more of a speed & stability improvement. Sun should of been honest and and kept it in the 1.3 release numbers.
i dream of the days when i'll go back into c, ai and hacking, but then i remember i sold my soul to sun. :nerd
infrandom
05-15-2002, 12:47 AM
Originally posted by pelikan
yeah, the syntax is different, but basically at the core they are the same structure & confines. But your correct, the actual syntax itself is very different.
jdk1.4 didn't do much for networking IMHO, the two big improvements to the I/O package (java.nio) are mutliplexing (which is more for server side vendors) and regular expressions (yeah it's weird that nio caused it finally be included but that's where it is).
for most people 1.4 was more of a speed & stability improvement. Sun should of been honest and and kept it in the 1.3 release numbers.
i dream of the days when i'll go back into c, ai and hacking, but then i remember i sold my soul to sun. :nerd
Ok, so I think we are settled with the VB discussion. Good discussion!! :D
Yeah the multiplexing/reactor was a dire need for java IO. The fact that Java scalability was always 1 thread per client was laughable. Async IO was the other thing I remember that was missing.
So now that you've mention selling your soul, do you work for Sun?
pelikan
05-15-2002, 07:32 PM
no i dont work for sun, im just personally heavily invested in java.
code java all day, own javaring, j2me phone, etc...
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.