Why do people still use C when they have C++? [closed] - c++

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
My question is this, why do people still use C when they have C++?
I've studied C because it is considered the language on which programmers communicate and is recommended for any programmer to know. I've then passed to C++ and I now think, why do people still use and program in C?
As far as I see, C++ is more powerful (has OOP aspects in it), it is as fast as C and overall just seems to be better. I've seen people dislike C++ because it is too hard to code in.

C is much simpler, and more fun to program in.
But what's more, the compiler is much much easier to write so there are still lots of environments where you can either only get a C compiler or the C++ compiler is far inferior (buggy, slower, generates bloated binaries).

C is often used for hardware programming, some microcontrollers and similar hardware often have a compiler which turns C code into native instructions for it. It makes programming those pieces of hardware much simpler than writing raw assembly.

Related

Recently publicized modern C derivative? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I remember reading in Hacker News about a modern C-like language with pretty nifty features, but I can't find it again. The name I can evoke is "C9", but that's not yielding search results.
It was pretty much a superset of C, with multi-pass compilation (and thus, no need for headers and forward declarations) and namespaces, as well as dynamic array syntax and string handling sugar.
I'm about to embark in a low-level project, and this would be a fantastic opportunity to try it out. My C is a bit rusty, I'm afraid, after years of python and coffeescript, so it would surely come in very handy.
Any hope somebody in SO has heard about it, or a similar project?
I think I read the same article. It sounds like C2, including the multi-pass parsing.

what is a good functional language that can be mixed with C++? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I would like to walk the path of functional languages, since i have started i have only used OO languages and multi-paradigm languages; in the last period of time i have focused myself on C++ and in my understanding functional languages shines when you need to keep a consistent state and they are often used by some mission-critical services like banking services.
I don not want to leave C++, I would like to try a mix, I'm also interested only in cross-platform solutions among x86, ARM and Linux, Windows and BSD/Mac, so i suppose that F# is out ( also it appears to be just the Microsoft version of Ocaml for what i have read).
Can you suggest a language that will be good for this mix and clarify where and when a functional language can really offer the most ?
If you're interested in a language which is similar to C++ (with good C/C++ interoperability, too), but has powerful constructs from functional languages, you might like Rust. One of the Rust developers wrote up a comparison of Rust's and C++'s goals, which you might find informative.
Support for ARM does not yet exist, but Rust is LLVM-based, and LLVM supports ARM, so it's certainly possible to do.
Use C++11 lambda functions and expressions ;)

Why C++ can't be made as Python in terms of convenience [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
This question may seem to be naive.
But I think it'll be much worse if I don't ask it at all.
When a discussion begins about the features of Python that the developers love the most, they usually mention list comprehension, syntax relying on indentation (thus avoiding brackets, etc.) and some other.
At such moments I ask myself a question why there can't be made a language based on C++ but having a syntax like in Python and having all the features like list comprehensions, generators.
I understand that such a language won't have all the features that Python has, e.g. eval or exac statements (because they rely on Python being an interpreting language), may be some others that I don't know of.
But I also know that there is a project called Shedskin which makes a C code of a Python code (with some restrictions on what can be used in Python code).
So, are there some real reasons why it's impossible to create such a language that will combine all the best features of Python and a very fast code that produces C++? Or it's just the turn of events that Python for some reasons became very popular and it turned out to be interpreted, so a lot of people use it for its greatest features still discontent at the speed of the code, and some of them struggle to create something (like Shedskin or Psyco) to speed it up?
Google as created a language called Golang ( or Go). It is a compiled language with python like syntaxe. There are alot of video and documenttation that will answer your question there.

what is better to learn for pattern recognition? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
c or c++??
if i want to make a project on pattern recognition( artificial computing)
using c or c++
which one should i choose??
Object Oriented Programming can probably be of some help if you start programming something complex. That is possible with C but will probably be easier using C++. That said there is a risk to get lost on the multitude of features of the language if you are just learning it, and it's probably less so with C. But it's not so hard to use only a subset of C++, so definitely C++.
The most important point is that you should first focus on the problem(s) to solve before focusing on the tools you are using.
I would use something high level so you could learn about your own algorithms and not how to implement your algorithms. If you can write pattern recognition single handedly in C I applaud you. It is beyond my skill.
Perhaps Ruby or Python then implementing the computationally expensive parts in native C?
Since C++ is effectively a superset of C, there is no good reason not to use C++.
I think that is the least of your worries. C is available on more platforms, C++ has more features.

Should i learn C++ or ASM? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
I'm confused should i learn C++ or ASM?
I'm just a hobbyist so no big deal but i need some advise.
thank you
Very Subjective but I would say learn C. Its the most basic language you will ever need to know. (If you know it you can grasp how assembly works without learning it). Then build on it and learn C++. If you don't know C (pointers, memory management, simple stack/function usage), I would learn it first before piling on C++ (with classes, inheritance, overloads, more complicated memory management).
Thats just my opinion though...
If you're a hobbyist, anything that seems interesting and fun to you will work.
The real question is : what software do you want to make? The project is the important thing.
Then the constraints relative to this kind of software will drive you to make your choice.
C++, ASM is very interesting, but nothing you should nowadays use as your primary language.
Are you a hardware hobbyist? ASM
Are you a game or other software-specific hobbyist? C++
Are you a My Little Pony hobbyist? PonyProg