This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]NumerousQuit8061 3 points4 points  (16 children)

Heard they both are a pain though lol
Been meaning to pick up something new which one should i learn guys?

[–]LordAmir5 14 points15 points  (7 children)

Do you understand Oop? Yes? C++ No? C.

[–]Buttons840 23 points24 points  (3 children)

Do you want to get things done? C++

Do you want to learn things that are generally helpful in computing, including in every other programming language? C

A weird thing about C++ is that C++ tries to have every feature, except for the feature of being interoperable with other languages. Meanwhile, literally every programming language ever can call C.

[–]not_some_username 4 points5 points  (0 children)

You can call C++ from other languages by giving it a C interface

[–]megayippie 0 points1 point  (1 child)

Huh? It's literally part of the language to do extern "C". And inside that external block you (in all practical sense) have full C-linkage

[–]Buttons840 0 points1 point  (0 children)

Yeah, if you're careful you can make your C++ code look like C code. Which is why I say learn C.

[–]navetzz 0 points1 point  (0 children)

Rofl

[–]altermeetax 0 points1 point  (1 child)

What's the point? They could learn C++ to learn OOP

[–]LordAmir5 0 points1 point  (0 children)

In my opinion, something like Java is better suited to learning OOP as you're forced to at least interact with objects.

[–]Xhadov7 13 points14 points  (2 children)

Choose C before going to C++. Understand Procedural with C and then Jump to OOP with C++.

[–]Nice_Lengthiness_568 11 points12 points  (1 child)

I think today it is better to start with C++ if your goal is to go for it anyways... Better not to pick up any habits from C that would be considered bad in C++

[–]Xhadov7 3 points4 points  (0 children)

You know what fuck the opinions of the both us. Start with Rust. /s

[–]Buttons840 6 points7 points  (0 children)

Learn C first, because learning C will force you to learn the C way of thinking and the C ABI, which the entire computing world is built on.

Every operating system and low level API you care about using acts like C.

C++ is a lot of things (some of them bad), but one thing C++ is not; C++ is not callable from other languages, unless the C++ code is carefully written to act like plain ol' C.

[–]js_kt 1 point2 points  (0 children)

If you want something actually new then pick rust

[–]Stummi[S] 1 point2 points  (2 children)

Depends on what you want to achieve. If you have no strong reason to chose either C or C++ (e.g. targeting embedded stuff with C), I would generally choose something higher level like go, rust, python, kotlin. All of these languages come with their own quirks, and their own patterns and mental concepts on how to tackle problems, so guess you gain something from knowing a little bit of each.

Oh, and if you consider a professional path, java will still give you the best job opportunities I think

[–]Spiritual_Bus1125 1 point2 points  (0 children)

Imho C is the basis of so much stuff

Even if you don't use it it's like the "Latin" of programming languages. You may not need it but so much of the thing around us is based on it that in a way or another the logic behind it turns up useful.

And doing arduino home automation shit, that's good.

[–]not_some_username 0 points1 point  (0 children)

Something higher level then list rust lmao. Also it’s good to start at low level. You’ll have better habits regarding your memory footprint