-
Is c++ Very tough than VB.
Hi all,
I have chatted with many c++ progrmmers who claims that c++ is very tough to understand as compared to VB.I don't know c++ but i know VB. I have seen c++ codes and i found that it is lengthy. It takes time to create in c++. But is it very tough for one to learn c++.
-
Re: Is c++ Very tough than VB.
Depend on u how your Mind is working if u like GUI environment the vb is best. But in my opinion database handling is very easy as compare to c++ in vb.
For c++ detail go to c++ section of vbforums.
-
Re: Is c++ Very tough than VB.
C++ is as you say "very tough". It takes much longer to learn (and master) C++ then it normally takes VB but C++ gives you a very solid foundation in computer science in general and programming in particular.
C++ was abandoned (well, not entirely) in VB's favour by many for one reason only - it takes noticeably less time to build application in VB. However, there are many cases that you are forced to go back to C++ and build some dll (to parse large strings for example) so you can improve your VB app's performance...
If you have a choice then go for it (C++ that is).
-
Re: Is c++ Very tough than VB.
Moved to General Developer
-
Re: Is c++ Very tough than VB.
Quote:
Originally Posted by kregg
As someone TRYING to learn c++ I know it's not a easy journey but once you get there its very worthwhile.
Visual Basic is... you guessed it... Basic. Extremely basic. To be familiar with C++, it's best you learn C. C++ as the name hints is the better version of the two.
To prove that Visual Basic is Basic and C++ is one step ahead of its game, I'll demonstrate.
For example, with visual basic Iteration statements, you can get this:
if condition = boolean then
commands
commands
end if
While C and C++ has 2 ways of doing things:
if (condition =value){
command
command
}
OR
if (condition==booleanvalue){
command
command
}
The first one tests if the value can be assigned to the condition. The second one checks if the booleanvalue (true or false) and condition are equal.
WOAH! Wait a minute! BS ALERT!.... how does that prove that C++ it "better" ... I'm calling your bluff... This is one of the biggest complaints I have about these kinds of threads. Just because it is DIFFERENT and you know something better than another does NOT make that thing better. Only DIFFERENT. D-I-F-F-E-R-E-N-T. Okay? Both languages have their pros and their cons. What makes something better than something else it HOW it is USED.
Let's look at game programming... for building something like Doom, VB is crap. We all know it. But C++ is king in this sort of stuff. But if I had to quickly throw together a utility app, like Calculator or a simple word processor, or a database browser.... nothing beats the RAD capabilites of VB.
It's all in the application. You wouldn't use a screwdriver to butter your toast (ok, maybe you would if it was the only thing around). You use the right tool for the right job.
Still doesn't make the knife any better than the screwdriver.
-tg
-
Re: Is c++ Very tough than VB.
Quote:
if (condition =value){
command
command
}
this is not a valid if statement in C (or even in C++). in this case, no matter if condition and value have different data types, the value of value will be assigned to condition.
as far as the original discussion is concerned, the comparison between the 2 languages is useless. both are different from the programming perspective. while VB is RAD (Rapid Application Development) which helps in creating the GUI of your application very fast and includes reliabilty to some extent, on the other hand, using C++ we can create really low-level disk utilities which VB is not capable of.
furthermore, no language in itself is difficult to learn. it is our bad process or lenient way of learning and understanding the topic which creates havoc.
-
Re: Is c++ Very tough than VB.
Quote:
Originally Posted by Harsh Gupta
... no language in itself is difficult to learn. it is our bad process or lenient way of learning and understanding the topic which creates havoc.
Is that so? ;)
-
Re: Is c++ Very tough than VB.
Just to reply to two of the previous posters:
Languages are easy, spelling is tough.
I have used a comb to eat spaghetti (how that is a relevant may not be immediately obvious).
C++ gives you a better foundation in computers, and has some really neat features. However, it is so massive and sprawling that only language lawyers tend to use all of the features. For instance, it remains an open question as to whether or not multiple inheritance is EVER necessary, though I personally think it is not.
Since nobody tends to use ALL of the features of C++, then everybody is using some portion. Microsoft said at one point that they use a "rational subset" of C++ for their programs. Odds are that you will do the same if you get into that language. Therefore, you could say that C++ is a little tougher to learn than VB....or that it is MUCH tougher, depending entirely on how much of it you want to learn. One example of this is the Standard Template Library. There are some amazing meta-programming things that have been done with the STL, but that would be a whole new layer of learning, and no analogue exists in VB.
-
Re: Is c++ Very tough than VB.
Quote:
Originally Posted by kregg
To be familiar with C++, it's best you learn C.
Agreed.
Quote:
Originally Posted by kregg
C++ as the name hints is the better version of the two.
Disagree. C++ adds object-oriented extensions to C. However I believe the C99 standard contains some newer features than C++.
Quote:
Originally Posted by kregg
To prove that Visual Basic is Basic and C++ is one step ahead of its game, I'll demonstrate.
For example, with visual basic Iteration statements, you can get this:
[...]
That is not iteration, that is selection.
Quote:
Originally Posted by kregg
[...]
The first one tests if the value can be assigned to the condition. The second one checks if the booleanvalue (true or false) and condition are equal.
You've demonstrated a mere syntatic facility which is present in not only C++ but also C and in fact all C-based languages (Java, PHP, C#, etc). Having separate assignment and equality operators does not make C somehow "better" than VB.
As techgnome said, it's all about using the right tool for the job. I personally do not consider any language "better' than another unless they are direct competitors, of which there are surprisingly few.
-
Re: Is c++ Very tough than VB.
Quote:
Originally Posted by Harsh Gupta
Quote:
if (condition =value){
command
command
}
this is not a valid
if statement in C (or even in C++).
Yes it is. "value" is assigned to "condition" and the block is then executed if "condition" evaluates to true. I use that approach very often.
-
Re: Is c++ Very tough than VB.
since my post is so controversial i decided to bin the damn thing.
I'd like to make this clear, as rhinobull said, c++ is...
(ok think man how do I say this without making another outcry of complaints...
....
...)
more appropriate for computer science and programming (is that ok?). For personal use you can use whatever. I'm personally trying to tame C#. Depends on the users preference (as so many "nice" people have pointed out)
-
Re: Is c++ Very tough than VB.
Quote:
Originally Posted by kregg
since my post is so controversial i decided to bin the damn thing.
I'd like to make this clear, as rhinobull said, c++ is...
(ok think man how do I say this without making another outcry of complaints...
....
...)
more appropriate for computer science and programming (is that ok?).
There are better languages to teach programming (if that's what you mean by "computer science"). As far as "for ... programming" ... or was that "for computer science programming"?
C++ is better suited than VB for:
OOP
using assembler
(probably a few other things I've forgotten).
As far as actual, real-world use ... there's no language that's just plain blanket "more appropriate" than any other language. That would be like saying that chocolate tastes better than vanilla.
Quote:
For personal use you can use whatever.
Many times for business you can also use whatever. Many times the choice in business is legacy - you don't throw out hundreds of man years of code just because [Language X] is "better". It may be a LOT faster to write code for X in language Y, but it's still faster to modify the existing program written in Z, even if Z is no longer even nearly as "appropriate" as Y.
-
Re: Is c++ Very tough than VB.
I'll think I'll just say nuttin...
omg you really going to keep bashing me in arent you?
-
Re: Is c++ Very tough than VB.
Quote:
Originally Posted by penagate
Yes it is. "value" is assigned to "condition" and the block is then executed if "condition" evaluates to true. I use that approach very often.
Why?
-
Re: Is c++ Very tough than VB.
Code:
if (condition =value){
...
}
Quote:
Originally Posted by ComputerJy
Why?
You prefer this?
Code:
condition = value
if (condition){
...
}
Why?
-
Re: Is c++ Very tough than VB.
no
I prefer becuase your so called value is a waste of memory unless it's a 1-bit value since all other bits will be discarded
-
Re: Is c++ Very tough than VB.
Quote:
Originally Posted by Al42
As far as actual, real-world use ... there's no language that's just plain blanket "more appropriate" than any other language. That would be like saying that chocolate tastes better than vanilla.
Many times for business you can also use whatever. Many times the choice in business is legacy - you don't throw out hundreds of man years of code just because [Language X] is "better".
We developed our own 4GL (ok maybe 5GL) so that we can deliver T-SQL query results to the user without doing any 3GL coding at all.
From a business point-of-view that was way more important then having our UI written in VB6 - actually it could be written in pig-latin for all it matters - it's just a silly UI.
I've created UI's and other code in probably close to a dozen languages - from 1980's mainframe BASIC, through COBOL and many in between.
As Rhinobull pointed out - getting a solid foundation in computer science (that's not a language!) - is the key.
The user never knows what it's written in - or at least, never should be concerned!
and - btw - chocolate is way better than vanilla ;)
-
Re: Is c++ Very tough than VB.
Quote:
Originally Posted by ComputerJy
no
I prefer
becuase your so called value is a waste of memory unless it's a 1-bit value since all other bits will be discarded
If you want (condition) to equal (value), you don't have that choice - you either use two statements or you use one, but "condition = value" is in there somewhere.
One of the strong points of C is that you can write a line of totally obfuscated code (while (c=getc) !=eof (or workable equivalent - I haven't coded in C in years) is a prime old example) and get something faster and smaller than you could get in any language other than by programming on the bare metal.
-
Re: Is c++ Very tough than VB.
Quote:
Originally Posted by szlamany
and - btw - chocolate is way better than vanilla ;)
PHILISTINE!
(Or is that another thread?)
-
Re: Is c++ Very tough than VB.
Quote:
Originally Posted by kregg
I'll think I'll just say nuttin...
omg you really going to keep bashing me in arent you?
We're not "bashing" you. If you're going to post opinions you should be prepared to have people disagree with them. Free speech :)
Quote:
Originally Posted by ComputerJy
Why?
The most obvious example is to cache the result of a function call.
-
Re: Is c++ Very tough than VB.
Quote:
Originally Posted by ComputerJy
no
I prefer
becuase your so called value is a waste of memory unless it's a 1-bit value since all other bits will be discarded
In the simple example posted, there is little significance of Value. There could be some situations where this is of value, but not many. However, it is easy to alter that to a situation with common value:
If (condition = SomeFunctionThatReturnsSomething() )
In that example, the return value from the function is retained in condition, as well as being evaluated in the if statement. This is missing from VB, and would make some things easier to write. However, I don't know whether the underlying code is any faster than writing:
condition = SomeFunctionThatReturnsSomething()
If (condition)
Which is the rough structure of how you would have to write the similar thing in VB (though the syntax is not correct for VB.....or C++ for that matter.
-
Re: Is c++ Very tough than VB.
my if statements were written in half pseudo-code and half c/c++.
Value is not anything specific. It can be string, integer, boolean, floating point, etc (you get the point basically).
Condition can be anything like a variable for example or a control on the form.
None of that was supposed to be precise.
Key word here people: PSEUDO CODE
-
Re: Is c++ Very tough than VB.
Quote:
Originally Posted by Shaggy Hiker
In the simple example posted, there is little significance of Value. There could be some situations where this is of value, but not many. However, it is easy to alter that to a situation with common value:
If (condition = SomeFunctionThatReturnsSomething() )
In that example, the return value from the function is retained in condition, as well as being evaluated in the if statement. This is missing from VB, and would make some things easier to write. However, I don't know whether the underlying code is any faster than writing:
condition = SomeFunctionThatReturnsSomething()
If (condition)
Which is the rough structure of how you would have to write the similar thing in VB (though the syntax is not correct for VB.....or C++ for that matter.
I don't know... I've been using VB and C++ for quite a while now, and I've never had to use it this way
-
Re: Is c++ Very tough than VB.
How much of a big deal are you all going to keep making over some silly pointer constructs!
It's great that C++ will allow you to assign and check values in one construct (if that's what this is all about)...
But it's just a 3GL syntax construct.
If speed is so important then the coder should be coding in a language closer to assembler...
-
Re: Is c++ Very tough than VB.
Quote:
Originally Posted by szlamany
How much of a big deal are you all going to keep making over some silly pointer constructs!
It's great that C++ will allow you to assign and check values in one construct (if that's what this is all about)...
But it's just a 3GL syntax construct.
If speed is so important then the coder should be coding in a language closer to assembler...
:thumb: so right I was just wondering why would anybody would use it.. but it seems some guys are biased towards C++ so much :D
-
Re: Is c++ Very tough than VB.
Quote:
Originally Posted by szlamany
If speed is so important then the coder should be coding in a language closer to assembler...
Or in assembler. Anything faster than that would have to be modifications to the microcode. (Bit-slice, anyone?)
-
Re: Is c++ Very tough than VB.
Quote:
Originally Posted by szlamany
It's great that C++ will allow you to assign and check values in one construct (if that's what this is all about)...
Thank you szlamany! That's what I was trying to get at. Finally, someone understands what I'm trying to say!
(Ignoring everything else in between)