[QUOTE=Icedshot;32058600]No its fairly correct, C++ is [i]mostly[/i] C with quite a lot of things added into the language. Yes, there are differences between the languages in some aspects which might stop C compiling properly under a C++ compiler, but C++ is still mostly a superset of C
[url]http://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B[/url]
[/QUOTE]
Their compatibility is completely irrelevant, C++ is an entirely different way of programming compared to straight C. Sure, you can be an idiot and code C in C++, but as soon as you go past that you'll be writing something that doesn't resemble C at all. And even if you were to do that, you might already be using C++ constructs like std::string instead of char*/[], streams instead of printf/scanf, etc.
The fact is, if you ignore the syntax and actually compare the two languages, there's very little similarity left.
[QUOTE=ZeekyHBomb;32059017]-snip-[/QUOTE]
My point was only that C, and by extension C++, wasnt designed to be used by a large group of extremely expert programmer, not that C++ is necessarily easier than other languages
[editline]1st September 2011[/editline]
[QUOTE=danharibo;32059246]They may well be 'compatible', but when you're writing software you should be using either C or C++, not mixing them[/QUOTE]
I never suggested you should mix them especially
[editline]1st September 2011[/editline]
[QUOTE=gparent;32059799]Their compatibility is completely irrelevant, C++ is an entirely different way of programming compared to straight C. Sure, you can be an idiot and code C in C++, but as soon as you go past that you'll be writing something that doesn't resemble C at all. And even if you were to do that, you might already be using C++ constructs like std::string instead of char*/[], streams instead of printf/scanf, etc.
The fact is, if you ignore the syntax and actually compare the two languages, there's very little similarity left.[/QUOTE]
I think you misunderstand what a superset is. It doesnt matter about the practical usage of the language, merely the syntactical construction and features, and how similar they are to the origins
In this case, C++ retains almost everything from C, changing a few things hence the difference, but the construction of the language is still essentially (though not literally) C + extras, hence an imperfect superset
I just think calling it C with more features is a stupid and inaccurate description of the language as a whole. IMHO it'd be like calling a tiger a superset of a domestic cat. But whatever, hopefully you're not one of those beginners who write C and compile it with a C++ compiler.
You have to remember that although you might be intelligent enough to dive straight into "real" programming chances are 90% of the other people in your class will not be. If you think the class isn't challenging enough then you should speak to your tutor and ask them to provide you with more advanced stuff (possibly from later on in the course). This way you can stay ahead of the game and when you finally get to the more challenging stuff you can take your time with it.
[QUOTE=gparent;32060214]I just think calling it C with more features is a stupid and inaccurate description of the language as a whole. IMHO it'd be like calling a tiger a superset of a domestic cat. But whatever, hopefully you're not one of those beginners who write C and compile it with a C++ compiler.[/QUOTE]
You kind of contradicted yourself there, the fact that you can, most of the time, compile C with a C++ compiler means that C++ [i]has[/i] to be a superset to some extent
I'm currently working with flowcharts and pseudo code in College, and I don't have a big problem with it.
The only thing I have a problem with is that I'll have to learn Visual Basic and Alice3D.
Its better then using Alice for an entire year.
[QUOTE=Icedshot;32063902]You kind of contradicted yourself there, the fact that you can, most of the time, compile C with a C++ compiler means that C++ [i]has[/i] to be a superset to some extent[/QUOTE]
English is a superset of Greek as I can say and write 'atheist', which is Greek, in the context of English.
[QUOTE=Jookia;32089557]English is a superset of Greek as I can say and write 'atheist', which is Greek, in the context of English.[/QUOTE]
Though that's not a big part of the English language. A big part of C is actually also in C++.
Though I agree with you about the fact that they should be used entirely different.
[QUOTE=Jookia;32089557]English is a superset of Greek as I can say and write 'atheist', which is Greek, in the context of English.[/QUOTE]What? No it's not.
EDIT: Am I missing something? I'm pretty sure that English and Greek only intersect and that supersets are defined by containing all the elements of its subset.
[QUOTE=thf;32089610]Though that's not a big part of the English language. A big part of C is actually also in C++.
Though I agree with you about the fact that they should be used entirely different.[/QUOTE]
A design goal (and selling point) is to be backwards compatible with C. That's all it is.
[QUOTE=Jookia;32089989]A design goal (and selling point) is to be backwards compatible with C. That's all it is.[/QUOTE]
Exactly. Then why do you say it isn't almost a superset of C?
[QUOTE=thf;32090002]Exactly. Then why do you say it isn't almost a superset of C?[/QUOTE]
[quote]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. It is not uncommon to be able to convert tens of thousands of lines of ANSI C to C-style C++ in a few hours. 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[/quote]
[url=http://www2.research.att.com/~bs/bs_faq.html]Is C a subset of C++?[/url]
[QUOTE=Jookia;32089557]English is a superset of Greek as I can say and write 'atheist', which is Greek, in the context of English.[/QUOTE]
Yes, but pretty much the entire rest of greek is unusable as english, and the word atheist would definitely not have been written atheist either. You seem to have missed the point somewhat
"It is not uncommon to be able to convert tens of thousands of lines of ANSI C to C-style C++ in a few hours"
Exactly, therefore C++ is an [i]imperfect[/i] superset! No, C isnt a strict subset, i said it wasnt. But the fact that C++ supports nearly everything in C without much modification means that to some extent it is a superset. I dont know why you are disagreeing with this, its extremely self explanatory and fairly obvious
[QUOTE=Jookia;32090029][url=http://www2.research.att.com/~bs/bs_faq.html]Is C a subset of C++?[/url][/QUOTE]
I'm not saying that it's a perfect subset, but it's almost one.
I dont see why so many people are encouraged to start with C++ on here, i started with easy stuff and i don't regret it. So many people think "why learn a language worse than C++ when i can learn the best language directly". It is always neglected that all of the bigger languages actually have a proper use, while i mostly do C++ programming i think it is important to know some other compiled and scripting languages as well. There are things that i'd rather do in java than in C++ and there are things that would require huge amounts of work when done in C++ and only 5 mins and a few lines when done in python. Proffesional companies also use a lot of python and other languages for their tools and i don't see what's wrong with learning a bit of those languages too. It's not that hard to learn a new language i think, you can do it on a week end if you know the general concepts from other languages.
Sorry just had to drop it here, everyone in this section seems to be so focused on C++(some on C# too) that i start to feel really sorry for the beginners. I would hate to learn the whole language and all of those oop concepts and control structures just with console output.
[QUOTE=Kamshak;32098660]I dont see why so many people are encouraged to start with C++ on here, i started with easy stuff and i don't regret it. So many people think "why learn a language worse than C++ when i can learn the best language directly". It is always neglected that all of the bigger languages actually have a proper use, while i mostly do C++ programming i think it is important to know some other compiled and scripting languages as well. There are things that i'd rather do in java than in C++ and there are things that would require huge amounts of work when done in C++ and only 5 mins and a few lines when done in python. Proffesional companies also use a lot of python and other languages for their tools and i don't see what's wrong with learning a bit of those languages too. It's not that hard to learn a new language i think, you can do it on a week end if you know the general concepts from other languages.
Sorry just had to drop it here, everyone in this section seems to be so focused on C++(some on C# too) that i start to feel really sorry for the beginners. I would hate to learn the whole language and all of those oop concepts and control structures just with console output.[/QUOTE]
Hi, i dont think anyone urges people towards C++, C# seems to have the much bigger tendency over here. What i was saying is that there is no specific need to start with an easier language, you can start with a harder language and not have a problem. But if you want to, you should do whatever you like
Be thankful you're actually using some sort of code.
I've been in a programming class for 7 weeks and so far we have used:
Scratch (the worst fucking thing ever created. Seriously.) and
Flash.
I hate my school >.>
People seem to be missing the crucial element here...
What your teacher is trying to do is get you to use the programming logic... If you get into the mindset of programming there's not much you won't be able to do. Sure, fannying around with boxes and things isn't all that much fun, I know it too well from playing with Robot C/NXT Developer. But it's all for a good cause in the long run.
[QUOTE=ThatzWatSheSed;32127580]Be thankful you're actually using some sort of code.
I've been in a programming class for 7 weeks and so far we have used:
Scratch (the worst fucking thing ever created. Seriously.) and
Flash.
I hate my school >.>[/QUOTE]
You underestimate Flash <.<
[QUOTE=Darwin226;32128200]You underestimate Flash <.<[/QUOTE]
HTML5 will be the death of Flash!
EDIT: Well, CSS3!
Could be. But since ActionScript is a sibling of JavaScript it's still worth learning.
[QUOTE=Darwin226;32130327]Could be. But since ActionScript is a sibling of JavaScript it's still worth learning.[/QUOTE]
Certainly! :)
I'm going to be taking a Video Game related degree (in addition to Comp Sci) at the college I'm going to. They call the degree "Interactive Media and Game Development", and it's pretty neat how they set it up. Basically, there are two parts of the degree you can go for, one is the artistic track (game design and such), and the other is the technical track (programming).
If you choose one track, you are required to take a couple classes in the other track, so you understand (at the basics) what they're doing. Plus it's all project based, so that's nice.
your teacher is maybe a rapist so watch out carefuly!!!!
[QUOTE=Spacesoldier;32395657]your teacher is maybe a rapist so watch out carefuly!!!![/QUOTE]
Please refrain from posting on any thread in this section again.
[QUOTE=sambooo;32395800]Please refrain from posting on any thread in this section again.[/QUOTE]
what do you mean
[QUOTE=sambooo;32395800]Please refrain from posting on any thread in this section again.[/QUOTE]
Feeding. Don't.
We are divided into several groups at our university. Like 6 fast groups for people that have programmed before and 6 for people that haven't. It's awesome :)
Sorry, you need to Log In to post a reply to this thread.