So I've been programming for a while now. I'm fairly proficient in C, C# and Java. I know a bunch of scripting languages as well. Is there any reason for me to learn C++? I don't really know anything about the language.
What type of things is it good for? What can I do with it that I can't do with the others?
Thanks
30 2446
So I've been programming for a while now. I'm fairly proficient in C, C# and Java. I know a bunch of scripting languages as well. Is there any reason for me to learn C++? I don't really know anything about the language.
What type of things is it good for? What can I do with it that I can't do with the others?
Thanks
If u know C then u have a good base for learning C++,C++ is simple said C superset.
Why should u learn C++?
U know C# is .NET oriented and C++ is COM oriented.Computers can run on .NET but some other scraps from metal can't run it while they can run on COM
Savage
If u know C then u have a good base for learning C++,C++ is simple said C superset.
Why should u learn C++?
U know C# is .NET oriented and C++ is COM oriented.Computers can run on .NET but some other scraps from metal can't run it while they can run on COM
Savage
I thought that C++ can be used with .NET. .NET is just a library after all. I also thought that C# can use COM as well, but may require wrappers.
Adrian
So I've been programming for a while now. I'm fairly proficient in C, C# and Java. I know a bunch of scripting languages as well. Is there any reason for me to learn C++? I don't really know anything about the language.
What type of things is it good for? What can I do with it that I can't do with the others?
Thanks
C++ is similar to C# and Java but has its roots in C. The family tree probably looks something like this: - ---------------
-
| Assembly |
-
| | |
-
| C |
-
| | |
-
| C++ |
-
| /\ |
-
| / \ |
-
| Java \ |
-
| \ / |
-
| \ / |
-
| C# |
-
---------------
A reason to learn it? Flexibility is one, it also has some interesting features in it that you may find interesting like templates (slightly different from Java ones which came out only farily recently) and algorithms.
Adrian
I thought that C++ can be used with .NET. .NET is just a library after all. I also thought that C# can use COM as well, but may require wrappers.
Adrian
Now i'm confused.
Please take a look at this
Savage
C++ is the only language where "(a+b)/c" *can* mean that a Btree is to be split
over c more blocks when a chunk b is added to a tree a. Or it *can* mean that
you've just shot the enemy; or maybe it's just an addition and a division ...
kind regards,
Jos
C++ is the only language where "(a+b)/c" *can* mean that a Btree is to be split
over c more blocks when a chunk b is added to a tree a. Or it *can* mean that
you've just shot the enemy; or maybe it's just an addition and a division ...
kind regards,
Jos
Hey, if a programmer want to be an idiot and use operator overloading to make code unreadable, that is his/her business (and will be put out of business quite quickly since no one will hire such an idiot).
Operator overloading has legitimate uses. It should be used sparingly.
Adrian
Now i'm confused.
Please take a look at this
Savage
So what are you confused about?
Adrian
Banfa 9,065
Expert Mod 8TB
C++ is similar to C# and Java but has its roots in C. The family tree probably looks something like this:
I believe the family tree is more like the image I have attached.
Note that modern standard C and C+ are more like siblings than descendents, both have features taken from the other language.
I believe the family tree is more like the image I have attached.
Note that modern standard C and C+ are more like siblings than descendents, both have features taken from the other language.
I don't know C++, but isn't one advantage to using C++ is something like memory management or memory allocation? Please collect me if I'm wrong.
I don't know C++, but isn't one advantage to using C++ is something like memory management or memory allocation? Please collect me if I'm wrong.
It is an advantage and disadvantage. Unfortunatly, there is no memory managment in standard C++. You have to do it yourself, which can be good or bad (but when bad, really bad).
Adrian
I believe the family tree is more like the image I have attached.
Note that modern standard C and C+ are more like siblings than descendents, both have features taken from the other language.
Your diagram is better than mine. But I still think that Java came out of C++.
As for C and C++ being siblings? Dunno if I agree. C++ was first written as a translator to C (think CFront). Now, C and C++ are fairly different with the newer C99 standard. Though I think that C++ standard will be bringing them in to line.
Adrian
Your diagram is better than mine. But I still think that Java came out of C++.
As for C and C++ being siblings? Dunno if I agree. C++ was first written as a translator to C (think CFront). Now, C and C++ are fairly different with the newer C99 standard. Though I think that C++ standard will be bringing them in to line.
Adrian
There's no Objective C in that little picture; it's somewhere near C++, also a C
descendant. Java has 'borrowed' quite some concepts from Objective C; just like
C# 'borrowed' ideas from Java; it's a pity only Apple and a bit of GNU uses it;
it's the poor man's SmallTalk using C in a very sensible way.
And there's more lacking in that picture: BCPL is a descendant from CPL which
in turn used a lot of ideas invented in the Algol (60 and 68) family. Assembly
language isn't a direct predecessor from BCPL, nor Algol; and then there's Lisp,
the assembly language for Artificial Intelligence. ;-)
kind regards,
Jos
Banfa 9,065
Expert Mod 8TB
BCPL is a descendant from CPL
damn, new I'd missed something, although as it turns out I'd missed somethings.
In many ways no language descends from assembler, it was what was there, languages came about because assembler is not terribly easy to use, and of course has no cross platform portability.
Banfa 9,065
Expert Mod 8TB
As for C and C++ being siblings? Dunno if I agree. C++ was first written as a translator to C (think CFront). Now, C and C++ are fairly different with the newer C99 standard. Though I think that C++ standard will be bringing them in to line.
I am sure that C++ chronologically came 2nd and I am aware that the first C++ compilers were actually translators to C.
However the diagram is meant to show how languages relate to each other intellectually (i.e. the ideas from which ones influenced which other ones) and from this point of view it is impossible to say Standard C++ descended from Standard C or the other way around, there has been quite a lot of interchange of ideas.
Here are some old notes I've had lying around for a while:
there is very little reason to switch from straight C to C++ without virtual functions. Without virtual functions, C++ wouldn't be object-oriented. virtual functions are still at the heart of object-oriented programming using C++.
Also, the creator of C++, Bjarne Stroupe, says C++ is not a superset of C and shouldn't be thought of as such. I'll have to look for that.
assembler is not terribly easy to use, and of course has no cross platform portability.
Everything should be done in assembly.
Here are some old notes I've had lying around for a while:
Also, the creator of C++, Bjarne Stroupe, says C++ is not a superset of C and shouldn't be thought of as such. I'll have to look for that.
Yeah, yeah, and humans aren't related to apes. C++ has so many linguistic similarities to C, that it is fairly easy to see that they are related. Superset or not, C++ took a lot from C.
Everything should be done in assembly.
I think we have had this discussion... ;)
Adrian
I am sure that C++ chronologically came 2nd and I am aware that the first C++ compilers were actually translators to C.
However the diagram is meant to show how languages relate to each other intellectually (i.e. the ideas from which ones influenced which other ones) and from this point of view it is impossible to say Standard C++ descended from Standard C or the other way around, there has been quite a lot of interchange of ideas.
Maybe there is something to be said for the intellectual influence, but I think that even then, I still think that originally, C++ took from C (and possibly others) and later on, it may have also swung the other way.
Adrian
I guess I misremember. From Bjarne's site and FAQ:
C++ is a direct descendant of C that retains almost all of C as a subset.
Elsewhere he said C++ was originally known as "C with classes".
But he also says this when asked if C is a subset of C++:
In the strict mathematical sense, C isn't a subset of C++. There are programs that are valid C but not valid C++ and even a few ways of writing code that has a different meaning in C and C++. However, C++ supports every programming technique supported by C. Every C program can be written in essentially the same way in C++ with the same run-time and space efficiency.
Thus, C++ is as much a superset of ANSI C as ANSI C is a superset of K&R C and much as ISO C++ is a superset of C++ as it existed in 1985.
Except for a few examples ... C++ is a superset of C.
Here is his answer to the question, "Should I learn C before I learn C++?".
Knowing C is a prerequisite for learning C++, right?
Wrong. The common subset of C and C++ is easier to learn than C. There will be less type errors to catch manually (the C++ type system is stricter and more expressive), fewer tricks to learn (C++ allows you to express more things without circumlocution), and better libraries available. The best initial subset of C++ to learn is not "all of C".
So what are you confused about?
Adrian
This two posts confuse me:
Don't forget that lots of industries use fault tolerant, mission critical and often
real time systems. None of them are PCs, no matter the OS installed on them.
All that other metal doesn't run .NET; they do run C or C++ though. You don't
want managed code when you just have a few micro seconds (or less) to
respond to some external signal reliably according to an SLA.
The two are just disjunct different worlds and IMHO it will take a long long time
before the twain shall meet.
kind regards,
Jos
and
I thought that C++ can be used with .NET. .NET is just a library after all. I also thought that C# can use COM as well, but may require wrappers.
Adrian
Savage
So what are you confused about?
Adrian
This two posts confuse me:
Don't forget that lots of industries use fault tolerant, mission critical and often
real time systems. None of them are PCs, no matter the OS installed on them.
All that other metal doesn't run .NET; they do run C or C++ though. You don't
want managed code when you just have a few micro seconds (or less) to
respond to some external signal reliably according to an SLA.
The two are just disjunct different worlds and IMHO it will take a long long time
before the twain shall meet.
kind regards,
Jos
and
I thought that C++ can be used with .NET. .NET is just a library after all. I also thought that C# can use COM as well, but may require wrappers.
Adrian
Savage
How do they confuse you? Are you confused about .NET being a library framework? Are you confused that C++ and C# can both use .NET? Are you confused about C# not being used in realtime embedded systems (yet)?
What are you confused about?
Adrian
Are you confused about C# not being used in realtime embedded systems (yet)?
This is what cofuses me.
Look at this part:
None of them are PCs, no matter the OS installed on them.
All that other metal doesn't run .NET; they do run C or C++ though
Which means that C# is only .NET oriented and C or C++ COM oriented.
Savage
This is what cofuses me.
Look at this part:
Which means that C# is only .NET oriented and C or C++ COM oriented.
Savage
There's are different types of computers than PCs or Macs; those other
machines know nothing about .NET or COM or whatever Microsoftism.
C++ and C run fine in those other environments; C# doesn't even exist there.
kind regards,
Jos
There's are different types of computers than PCs or Macs; those other
machines know nothing about .NET or COM or whatever Microsoftism.
C++ and C run fine in those other environments; C# doesn't even exist there.
kind regards,
Jos
Aha,thanks Jos!
Savage
Hi Silent1Mezzo,
not that i could help you to answer if you should learn c++.
This was the original question wasn´t it ? Have you found out during this thread ?
I believe the family tree is more like the image I have attached.
Note that modern standard C and C+ are more like siblings than descendents, both have features taken from the other language.
BTW, Banfa, what did you use to generate the graphs? The dot language? Or something else?
Adrian
There's are different types of computers than PCs or Macs; those other
machines know nothing about .NET or COM or whatever Microsoftism.
C++ and C run fine in those other environments; C# doesn't even exist there.
You just said it: No C# on those machines.
You are aware, I hope, that the MSIL language used by the Microsoft CLR to interpret C# code is public domain? That means all you need do is write your own CLR for one of those other machines and BOOM! all existing Microsoft .NET code will execute.
Microsoft will not write those CLRs due to monopoly issues. But you can. And that would be the foundation of a real business.
Banfa 9,065
Expert Mod 8TB
BTW, Banfa, what did you use to generate the graphs? The dot language? Or something else?
Paint initially, then when the image proved to be too large I used The GIMP to edit it (I think).
Those are the 2 graphics packages I use, both free. The only thing I have against The GIMP is it really is for manipulating images that already exist, if you wanted to create a new image and draw a circle on it that would be quite hard in The GIMP, very good apart from that.
Banfa 9,065
Expert Mod 8TB
You are aware, I hope, that the MSIL language used by the Microsoft CLR to interpret C# code is public domain? That means all you need do is write your own CLR for one of those other machines and BOOM! all existing Microsoft .NET code will execute.
Why on earth would anyone want to muddy up a nice clean embedded environment by writing a .NET interpreter for it.
Actually I realise that what Jos references includes a whole raft of platforms that are not embedded but all the same, I am sure they are all running very nicely with and MS garbage muddying the waters. Why would you want to cripple a system by introducing MS bloat code.
Paint initially, then when the image proved to be too large I used The GIMP to edit it (I think).
Those are the 2 graphics packages I use, both free. The only thing I have against The GIMP is it really is for manipulating images that already exist, if you wanted to create a new image and draw a circle on it that would be quite hard in The GIMP, very good apart from that.
I use GIMP. Don't find that very difficult drawing a circle or making a new image. I like the layering stuff you can do with it (that is how I generated my Avatar). Unfortunately, you cannot manipulate it using vectors, though I've not played with the line drawing stuff in it.
I also use paint when I don't want or need overkill. And then I use ASCII art when I feel that graphics are overkill. ;)
Adrian
Why on earth would anyone want to muddy up a nice clean embedded environment by writing a .NET interpreter for it.
Actually I realise that what Jos references includes a whole raft of platforms that are not embedded but all the same, I am sure they are all running very nicely with and MS garbage muddying the waters. Why would you want to cripple a system by introducing MS bloat code.
Doesn't Java have virtual machines for some embedded stuff? It is the same idea. I thought I mentioned it.
Adrian
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Rob |
last post by:
i know javascript, vbscript, asp css and alot more and im only 14 i was
wondering which is easier to learn php or cgi. any help?
|
by: Bicho Verde |
last post by:
I have now free time and money to do what I want :-)
I have some basic skills in programming (C, Pascal, Macromedia
Actionscript) but don't know exactly what to do in the world of programming.
And...
|
by: Elijah |
last post by:
I have read many of the topics on learning C++ or Java first.
It seems like everyone says something different.
I would like to know if I should learn C++ or Java.
First a little about myself.
I...
|
by: Rhino |
last post by:
I am giving some thought to applying for some jobs that want people with
Java and C++ experience. I have been writing Java for several years and am
fluent enough that I don't have to get help with...
|
by: Hermawih |
last post by:
Hello ,
I want your opinion about this .
In order to say it clearly , I think I have to describe it in long sentences .
I could consider myself as Intermediate/Advance Access Developer ;...
|
by: TAM |
last post by:
Hi,
I read that ASP.NET uses VB.NET instead of VBScript. I also read that
ASP.NET is a subset of VB.NET. So if I learn VB.NET first then do I have the
knowledge for programming ASP.NET...
|
by: abhi |
last post by:
hi everybody am new to this group and help me to learn C
|
by: anand devarajan |
last post by:
hi friends,
im anand im just a beginner in c learning for the past two
weeksnow i can write simple prgs can anyone help me to get well known
to c lang so that i should able to write even tough...
|
by: pandit |
last post by:
hai all,
i want to become a good programmer. one of my friends ( named
"arnuld", he posts here infrequently), taught me Lisp. so i am not a
programming beginner.
i have heard these 2 points....
|
by: Chris Carlen |
last post by:
Hi:
From what I've read of OOP, I don't get it. I have also found some
articles profoundly critical of OOP. I tend to relate to these articles.
However, those articles were no more objective...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |