Is learn C instead of C++ a meme? C isn't faster than C++ so why learn it instead of C++?
Is learn C instead of C++ a meme? C isn't faster than C++ so why learn it instead of C++?
Other urls found in this thread:
benchmarksgame.alioth.debian.org
twitter.com
Kys
Why?
>C isn't faster than C++
benchmarksgame.alioth.debian.org
Yeah it is
>so why learn it instead of C++?
Why not learn both? You're shit posting on Sup Forums, your life isn't so precious you can't pick up C and C++
>thinking c is somehow related to c++
if you want to get paid for programming then you will have to learn both anyways.i would suggest you start with c not because its faster but because its easier to understand and build on top of c and it will be much eaiser for you to learn c++
>>C isn't faster than C++
>benchmarksgame.alioth.debian.org
>Yeah it is
No its not. Those programs are not the same implementation of the algorithms.
Do you have any source to back that up?
you forgot some ++ here and there I believe
If you can program in C you can program in C++.
And your claim is false
C is better
c is only one third of c++, hence its quicker to write c than c++
Because it's easier, more fundamental, and less bloated. It's just better to learn it first, it's way easier to learn actual programming without the language blocking you. And it's not like you're loosing that time, most of that C knowledge will be useful in learning C++ in the future.
if you use classes in c you will get a compile error
if you use structs in c++ everyone will think you are stuck in the 80s
writing only c in c++ is valid but there's no point in doing it, since you want to use c++ language features to make your life easier.
Basically will tell you that C > C++, but they presume that the programmers are (((SMART))) enough to actually make C better than C++.
Most of the retards here would let memory leaks out of the ass due to unsafe handling of pointers and unresolved exceptions. Basically, they'll make more mistakes that C can't catch and thus write shit code that runs slower than its C++ counterpart.
Who do you trust more, RAII or Sup Forums """"programmers""""?
That was not my point. Picking up C++ after knowing C is not some kind of mental Olympics.
Are memory leaks that much harder to deal with in C than in C++? They both use pointers don't they?
In c++ you have RAII which in simplification are basically constructors/destructors
You can leak in C++ if you are an idiot, but they also dumb it down so you are less likely.
If you're leaking in C it's because you're not paying attention or you have very very poor design.
Look at the code
...
I like this one better.
Because it's simpler. If you're a beginner, it helps to use a simple language, like C. C++ features make a lot more sense when you already understand C.
Actually, structs are rather commonly used in C++ in template abuse, because everything's public.
It's so small now
Like the language of C
kek
Yes, because C++ has unique_ptr to help reduce the cognitive overhead of dealing with memory ownership. Granted, in C if you follow a few rules you will generally avoid issues, but auto_ptr makes it a ton easier.
Learning C++ will effectively learn you C.
Programming languages are not individual, isolated islets. There's a bigger, general language of computation.
I don't understand this whole meme of learning a specific language? I can program in a new language if you give me a week.
The code is all open so if an algorithm is just plain better then you could always reimplement that with your favorite language. Compiler quality also factors into this though.
C++ is rediculously complicated. It's from the early days of OOP and instead of deciding on a standard, they just implemented every single possible way of doing something.
Learn C for the low-level interesting knowledge like arrays, pointers, memory allocation.
Then learn something more modern like C# for actual modern object orientated principles in a modern polished language.
You can easily go from C or C# to C++, converging in the middle, beacuse you'll know what you're trying to do or looking up. Trying to learn C++ as a noob is unwise.
>But hurr I learnt on C++, it's better to learn on something harder that doesn't handhold you maybe you're just a retard
^ Then go learn C if that's your view, you gain all the "hard" close to the metal hipster points that you get from C++ in C, but without the shitty OOP misdirection and bad practices.
what's wrong with structs?