[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Why should I learn C++? >Tell me one or more reasons why
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 34
Thread images: 2
File: descarga (1).jpg (4 KB, 156x156) Image search: [Google]
descarga (1).jpg
4 KB, 156x156
Why should I learn C++?
>Tell me one or more reasons why
>>
>>55132415
>>>/g/sqt
>>
>>55132415
Only if you wanna make AAA games. For everything else it's not worth it.
C++ is a shit language. Efficient but shitty.
>>
>>55132604
I wanna know why is a shit language...
>>
>>55132604
what's the best lang for making indie shit? something like three or four people could throw together.
>>
>>55133674
It's just old. It has the goods. It has the goods in spades but the good stuff has been bolted on over the last 40 years and it's not exactly pretty. With computing power to spare these days it's just more efficient to use some kind of managed noob language. You just get stuff done faster and with less shit to worry about. I guess it's there for top speed bits but even then you can just mix it in with other languages where you need it. It's still a tool for a job is what I guess I'm saying. It has its place.
>>
>>55133751
How it can be old if the C++17 standard is about to came out?
>>
>>55133716
You mean a game? Learn ue4 and blueprints. Web shit learn laravel or node I guess. Anything else just don't bother cos you having to ask means your not a guy for the more complicated stuff.
>>
>>55133794
Cos it still has all the old shit there. People coming to c++ have to wade through all the tutorials that are out of date to find the more recent stuff. It's a tough language to get into because it's too liberal with backwards compatibility. Its still compatible with c. There is too much to master and no clear starting point any more.
>>
>>55133716
no real way around C++
unless you want to try shit like panda3d in python
>>
>>55132415
great language.
especially c++14 which now has multithreading in the std library.
it's the bomb.
it can do literally every fucking thing.
it can also be a mess if you suck
>>
let's go variadic templates now
//========
// Print - variadic template example
template<typename L>
ostream& Print(ostream &os, L last)
{
return os << last;
}

template<typename A, typename... Args>
ostream& Print(ostream &os, A a, Args... tail)
{
os << a;
return Print(os, tail...);
}
//========
>>
>>55134097
I like you.
>>
>>55133716
Steam indie devs mostly use C#.
>>
>>55133716
From what I understand, most/alot of indie devs use unity or some similar easy enough to use engine with C#.
>>
>>55132415
A lot of jobs require C++.
>>
>>55133716
Java library called LibGDX
ignore the C# faggots
>>
>>55133716
Make your with a OpenGL binding of your choice.

For 2D games, however, always go with LOVE. Fast, efficient, and so easy, even a sperglord like you can't mess it up.
>>
>>55132415
I wan't to make my own kernel and OS someday (ok, really just OS), and at this point, learning C/C++ is mandatory.
>>
>>55132415
If you want to write anything with high performance, you need C++.

Machine learning, neural networks, graphics rendering, physics simulation are the higher level applications.

For all other things like small scripts or UI's that just wait on user input, C# & Python is fine.

If you want to be a web dev, just roll with Javascript (or Typescript if you want something sane).
>>
C++ is seriously like using a very sharp knife. You get very direct control over memory and optimizations, but at the price of needing to know what the fuck is going on at all times. You can actually create really inefficient C++ code if you don't know what you're doing. Even if you do know what you're doing, you can still create shitty code (https://groups.google.com/a/chromium.org/forum/#!msg/chromium-dev/EUqoIz2iFU4/kPZ5ZK0K3gEJ).

I'd suggest avoiding it until you really know how to program. Learn C first, it's a lot simpler with a LOT less gotchas, even though C++ is much comfier when you have learned both.

>>55135290
How many machine learning / neural networks / graphics / physics applications have you written?
C++ isn't necessarily a must-have. Other languages can be pretty dang efficient.
>>
>>55134097
>he hasn't created a variant<T1,T2,...> type using the full power of C++ template metaprogramming
>>
File: 1429177114622.jpg (12 KB, 258x245) Image search: [Google]
1429177114622.jpg
12 KB, 258x245
>>55135065
>>55135065
>java
>For games
>>
>>55135338
>How many machine learning / neural networks / graphics / physics applications have you written?
>Implying anyone here writes anything
How many have you?
>>
>>55135338
>C++ is seriously like using a very sharp knife.
>Learn C first
This nigga
>>
>>55135877
c is like using an elongated fingernail as a cutting tool.
>>
>>55135840
I've written many, MANY machine learning applications. Yes, most libraries run C/C++ code underneath, but that's exactly the point, when the tools and wrappers exist, you dont' really need to use that language for developing applications. Research in these areas is almost never done in C++
>>
>>55132415
This probably doesn't convince you but for me it's important.

C++ is almost mandatory if you want to do anything related to particle physics. Some have gotten around with python using PyROOT, but still one should know at least the basics of C++.
>>
>>55135840
None, but I doubt the other poster has either, so I don't think either of us has authority on the topic.

>>55136406
Isn't it easier to create FFI against C libraries than C++? So for stuff like a machine learning back end, it would usually be a better idea to write it in C than C++
>>
>>55133837
so what

if something still has old shit in it then its a layer of compatibility.

"it includes older stuff" is not a reason to say it sucks
>>
>>55135877
C is a pain in the ass to use for reasonable applications, but there are very few gotchas.
>>
>>55132415
>why should I learn C++?
It is a decent programming language that allows you to have control of everything.
Want to make a library that makes it easy for the users? Or want to use a library that makes it easy to do something? Or do you want to make something which requires an efficient implemention where you instruct it with a high level of abstraction?
Then C++ is a good choice.
There are a lot of paradigms to learn and you won't learn them all for the first 50 applications you write.
But you will learn a lot from writing applications this way.
I even think it is fine for beginners.
>>
>>55136614
It sucks because it has incredibly complicated syntax and lots of hidden/implicit semantics, plus lots of complicated rules e.g. RAII. It's nice if you can wrap your head around it all but even then it's usually overkill.
It's an absurdly powerful language, not much comes close, but at a cost.
>>
>>55136406
>I've written many, MANY machine learning applications. Yes, most libraries run C/C++ code underneath, but that's exactly the point, when the tools and wrappers exist
You can't really say you've "written" a machine learning program either when all you did is to use the python/C#/Javascript API and write a nice UI on top of it. All you did is write a service that happens to use machine learning.

And if you have to do more than just writing a UI, then you're going to have to mess with the code, which is written in C++.
Thread replies: 34
Thread images: 2

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.