[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]

C / 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: 17
Thread images: 2

File: PIC 3.png (46KB, 375x360px) Image search: [Google]
PIC 3.png
46KB, 375x360px
I think I am right in thinking C is the better language for where my interests lie. But if this is the case can anyone shed any light on what people mean when they say C++ is backwards compatible and a superset of C? If this is really true surely learning C++ will by definition be superior? My only grasp is that C++ is mostly about OOP whereas C isn't?
>>
>>62476550
Lost the first bit of my post when typing -

I'm just a IT sysadmin/helpdesk but I have a passion in computer engineeirng/sci. Last year I took a beginners course on programming which used Python - it was great but it isn't really a low enough language to provide any insight into computer engineering - the course was more of a learn computer science approach. I did teach me a lot of fundamental programming concepts though.

I doubt i'll ever be interested in writing any front end applications, but I would love to learn the fundamentals of how to write a device driver or kernel module. Ideally I want to specialise in operating systems in my career so hope this would also help in this area.
>>
File: 1476072403716.png (226KB, 394x397px) Image search: [Google]
1476072403716.png
226KB, 394x397px
>mom flushed the std::cin
>>
>>62476622
>I doubt i'll ever be interested in writing any front end applications, but I would love to learn the fundamentals of how to write a device driver or kernel module. Ideally I want to specialise in operating systems in my career so hope this would also help in this area.
This is C territory.
>>
>>62476550
>what people mean when they say C++ is backwards compatible and a superset of C?
Part of C compiles with C++ compiler.
>learning C++ will by definition be superior
C++ is not superset of C, objective-C and ec langauge are.
Also C++ adds lots of stuff to the point it's cluster fuck nobody really wants to use.
>C++ is mostly about OOP whereas C isn't
C++ is about writing templates that nobody can read, complaining about const correctness and shouting about ZERO COST ABSTRACTION when everything you do still has hidden cost.
>>
>>62476790
I expected so.

But I read that C++ is a superset of C, so I wonder why not to just learn C++ if that is the case as it would be superior? Is this information wrong?

Is what Linus (and others) said about the compilers being unreliable / less explicit than the C ones the reason why most of this territory is still C?
>>
>>62476550
They're both bad languages. Pragmatic, yes, but poorly designed.
>>
>>62476899
>>But I read that C++ is a superset of C
It isn't. There is valid C which isn't valid C++.

What's more, learning C++ won't really give you a taste for how problems are solved in C. If you're intent on learning these languages, learn C first.
>>
>>62476899
C++ may look and behave like C, but strictly speaking it's not a superset.
You shouldn't compare those languages. C is a minimal language and C++ comes with batteries included (a.k.a. bloated).
>>
>>62476913
If they are bad or not - if most OS stuff is written in them thats what I want to look into I guess.
Out of interest what do you prefer?

>>62476944
I see. I'll forget the whole C++ is improved C idea.
>>
C is better for really low level stuff such as microcontroller firmware. C++ is much more convenient for general purposes, not just because of OOP but also the standard libraries. If you're going to learn C++, be sure to learn C++11 or newer, preferably C++14 or even C++17. There are lots of new, super-useful stuff.
>>
>>62476550
C++ is almost a superset of C. C evangelists will try to claim otherwise with muh keywords and muh void* cast, but it's mostly bullshit.
However, by learning C++ you often don't learn C completely. A lot of learning resources use pointers only as references that can be null and skip out on a lot of commonly used C functions.
>>
None of this deprecated 80s bullshit matters, versus any web framework. compiled desktop apps died in about 2007 because everyone's sick of dealing with operating system updates breaking the software and then they have to stick with windows xp service pack 2 for 8 years.
>>
>>62477106
No web framework would exist without hardware with drivers and firmware written in C, dumbass
>>
They use the same syntax but very different programming styles. You cant really learn C by learning C++. For example in C++ you would use classes and exceptions instead of checking the return of everything like in C.
>>
>>62477230
Valid point but it's already done and you don't need to think about it anymore. All of the low level jobs are going to be already taken.
>>
>>62476550
They mean you can usually include your C code in your C++ project just fine and it'll compile normally.
Thread posts: 17
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.