[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Is learn C instead of C++ a meme? C isn't faster than C++

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 30
Thread images: 2

Is learn C instead of C++ a meme? C isn't faster than C++ so why learn it instead of C++?
>>
Kys
>>
>>57805450
Why?
>>
>C isn't faster than C++
https://benchmarksgame.alioth.debian.org/u64q/c.html
Yeah it is

>so why learn it instead of C++?
Why not learn both? You're shit posting on 4chan, your life isn't so precious you can't pick up C and C++
>>
>thinking c is somehow related to c++
>>
>>57805440
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++
>>
>>57805480
>>C isn't faster than C++
>https://benchmarksgame.alioth.debian.org/u64q/c.html
>Yeah it is

No its not. Those programs are not the same implementation of the algorithms.
>>
>>57805586
Do you have any source to back that up?
>>
>>57805503
you forgot some ++ here and there I believe
>>
>>57805440
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++
>>
>>57805440
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.
>>
File: 1480180621611.jpg (43KB, 852x960px) Image search: [Google]
1480180621611.jpg
43KB, 852x960px
>>57805723
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 /g/ """"programmers""""?
>>
>>57805781
That was not my point. Picking up C++ after knowing C is not some kind of mental Olympics.
>>
>>57805782
Are memory leaks that much harder to deal with in C than in C++? They both use pointers don't they?
>>
>>57805838
In c++ you have RAII which in simplification are basically constructors/destructors
>>
>>57805838
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.
>>
>>57805613
Look at the code
>>
>>
>>57805931
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.

>>57805781

Actually, structs are rather commonly used in C++ in template abuse, because everything's public.
>>
>>57805931
It's so small now
>>
>>57806109
Like the language of C
>>
>>57805756
kek

>>57805838
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.
>>
>>57805440

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.
>>
>>57805586
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.
>>
>>57805781
what's wrong with structs?
Thread posts: 30
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.