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

give me one reason why learning C++ is a bad idea

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: 112
Thread images: 5

File: cplus.jpg (36KB, 433x455px) Image search: [Google]
cplus.jpg
36KB, 433x455px
give me one reason why learning C++ is a bad idea
>>
>>57069447
It's not C.
>>
C++ is the most complex language commonly used.
You will have to use header files.
Cross platform viability and speed of development will be much worse compared to most other languages. CPP has low productivity.
You could save yourself a lot of time and trouble by learning a safe language with a proper standard library and better IDE support.

Unless you are doing peak performance programming magic or program microcontrollers there really is no reason to learn C or CPP.
>>
File: geraltFromSweden.jpg (23KB, 336x336px) Image search: [Google]
geraltFromSweden.jpg
23KB, 336x336px
>>57069511
thanks senpai
>>
>>57069447
you'll become autistic
>>
It depends on what you use it for. At our faculty we use C++ to develop a high perfomance 3D viewing tool for land surveying and architectural data that has a very high data throughput.

If you want to program something that isn't as demanding I'd use something a lot less complex than C++11. You have to keep in mind that readability, speed of development and adaptions and team cooperation on the code may be an issue.
>>
>>57069780
its not an issue, I am already autistic and mentally ill.


>>57069838
>>57069511

Will C++ give me overall advantege or let see a bigger pictrue as C?

For example for somebody who was programming whole life in python or Java. C and Asm allow to see bigger pictrue,
>>
>>57069447
I can't...
>>
>>57069876
I don't know what you mean by bigger picture. C is very close to the hardware. C++ has extensions that allow more abstraction, but it can still be a lot of work to implement something.

Programming languages should take some of the work of abstracting from the hardware from you in order to give you more time to work on the problem itself. Of course a higher level of abstraction comes with costs. For instance Python only runs on an interpreter that has to read and parse the program text you wrote every time you run it. With C. C++ or assembler you trade in the advantage of comfy programming for raw speed.
>>
File: 1440446447638.png (938KB, 1080x710px) Image search: [Google]
1440446447638.png
938KB, 1080x710px
>>57069447
It will give you useful skills and employment prospects.
>>
>>57069447
Look at how many books you'll need to buy in order to "learn" it.
>>
>>57069977
>buying books
>>
>>57069985
You'll also need to read those books.
>>
>>57069998
And that is a problem how, exactly?
>>
File: hmmm.jpg (11KB, 300x225px) Image search: [Google]
hmmm.jpg
11KB, 300x225px
>>57070006
>>
>>57070006
Not him, but one C++ reference manual/introduction I found at a used bookshop dating from 2001 is easily 1000 pages of 12 point text. K&R is 267 pages in comparison. That's not including all the new shit like C++11 and what-not.

Also, trying to learn online is an exercise in futility with differing materials and spotty help so don't think that you can cheap out by doing that.

It's a powerful language, but unless you actually have a use for the complexity/really have no life, it's not a game changer.
>>
>>57069977
I think that It would require 2 books for C++ in general.

C++ Primer as intro and another more advenced book on C++

C++ Priemr is 1k pages long, but -appendix probably around 700-800 pages of real text.
>>
>>57070051
C++ job offers have 30-40% higher salary than webdev/java.
>>
>>57069942
>C++ has extensions that allow more abstraction,
Tell me Pajeet, what's more abstract than

void *

?
>>
>>57070365
static virtual abstract protected void* :^)
>>
>>57069447
It is if you're not out on a vidya dev job.
And even then C# is rapidly replacing gameplay programmers.
>>
>>57069447
templates
>>
>>57070383
>static virtual abstract protected void
Pajeet shitposting C# in a C++ thread. No rupees and no food today.
>>
>>57069447
people who hate based sepples are mostly old functionalfags who are bootyblasted that their fifteenth implementation of scheme is irrelevant to the real world
>>
>>57070455
apart from abstract those are valid keywords anon, altough i'm not sure if they can apply to pointers.
>>
>>57070421
is generic programming a bad thing?
>>
>>57069447
I really just can't, anon.
>>
>>57070498
>abstract doesn't exist
>protected is not a modifier you can write in front of variables or methods
>static and virtual contradict each other
>>
>>57070365
A Pajeet would only ever know about one programming language, and that badly. A Pajeet wouldn't have fathomed the conecpt of abstraction.
>>
>>57070601
I don't know C++ i'm just saying what i've heard and i'm being honest about it.
>>
Why would learning a programming language be a bad idea?
>>
>>57070601
Generic programming is a useful tool.
It's just that sepples template system is complex as fuck.

Most other languages like C# do the type substitution at runtime. But c++'s runtime is far to simple for that.

So c++ templates is basically a find and replace on steroids. It has to create a copy for every type.

It gives you a lot of freedom, But they're notoriously hard to debug, have horrible syntax, inflates compile times, causes code bloat, ect...
>>
>>57069447
>one reason why learning C++ is a bad idea

If you don't already know it and waste time on /g/, you're more than likely not smart or hard working enough to really master it.

It's a fuckhuge language that's still growing, and there isn't a ton of handholding and verbosity overkill like Java/C#.
>>
>>57069447
C++ is insanely complex. If I need to do hardware near programming then I would use C and if I want abstraction I use C# or Python.
>>
>>57071477
You don't have to use all the features.
>>
>>57071543
Exactly, thus I use C.
>>
>>57069511
>Cross platform viability [..] will be much worse compared to most other languages.

u wot nigga

C++ is like the least platform specific language ever except for C maybe. There are compilers for it for every architecture and OS I can think of
>>
>>57071597
its different language, only common thing is ability to compile C code in c++ compiler
>>
>>57071637
Strike that. I wanted to include a C module into my Visual Studio C++ project -- and that wasn't possible.
>>
>>57069511
>Cross platform viability and speed of development will be much worse compared to most other languages. CPP has low productivity.
I think you're getting confused with C here.
>>
>>57071597
Why? The problem with C++ isn't the extra features, most of them are actually useful.
The added type safety, dot calls helping with intellisense/code completion and the occasional template, but then I also disable exceptions in the compiler.

It's the mentality of c++ programmers that sucks. They tend to over engineer everything, it's like they have an identity crises. They want to be like the Java pajeets but don't realize they're writing in a language that is basically dead outside multimedia and embedded programming.

Even Linus his argument against C++ all comes down to "There are a lot of shitty C++ programmers so by not writing in C++ we filter out a lot of bad programmers"
Which is not an argument against C++

>>57071660
#ifdef __cplusplus
extern "C" {
#endif

// all of your C code here

#ifdef __cplusplus
}
#endif
>>
>>57072043
>Even Linus his argument against C++ all comes down to...
no, his argument is compilers are crap which is true.
>>
>>57072101
That was him talking about compiling the Linux kernel in C++.
And I agree with him that that is a bad idea.
>>
>>57072141
oh yeah, definitely. C seems like a great language for a kernel because you do want something rather low-level and with wide support, and C is pretty much the only language that can do both of these.
>>
File: 1472914468145.jpg (158KB, 1500x1500px) Image search: [Google]
1472914468145.jpg
158KB, 1500x1500px
>>57069447
i cant fucking remeber how many times i told this to you brick-headed motherfuckers.

RIGHT TOOLS FOR THE RIGHT JOB!

you not gonna write a website in c++ and you not gonna write a CAD software in javascript.whats so fucking hard to learn in this?
>>
>>57072486
Today, language choice is usually a carrer choice.

If you are going to work as Java dev, you will code in java + framework, maybe some java web stuff, similar with C#, even if they will ask you to do web dev stuff you will have C# mvc.

So if you are going to work as Java dev, you will not code in python or C.

Your answer is valid from hobbist point of view. Of course its better to know several languages even if you code 90% in one language and on pradagim.


but as I said, language choice == for majority path carieer choice
>>
>>57072486
This, theres no point about arguing on what languages to learn. You learn what you need for the task in hand. You switch to other languages for other applications. Programming languages are just tools at our disposal.
>>
>>57072821
Carrer choice if you plan to be a codemonkey yeah
>>
>>57072908
heh, wise words anon

where are you working?

google, nasa, cern, belllabs, nsa?

or are you certified c fizzbuzz neet?

everytime I read 4chin its like another dimension.
>>
>>57072996
Started in embedded so C fizzbuzz certified, now managing projects / telling people what to do. Our codemonkeys are mostly Indians that describe themselves as expert programmers. When you give them a new language that is better for a specific task they tend to break because they don't now how to transition, all because they are stuck in the ways of the language they used.
>>
>>57072821
just because you know a language doesn't restrict you to only work in that language, one should know has many languages as one can so he can adapt.
NOT knowing a language can(will) restrict you.
>>
>>57073237
I wrote in post that you replied to
>Of course its better to know several languages even if you code 90% in one language and on pradagim.
>>
>>57069447
c++ doesn't have a built in graphing library, among other libraries that would be really nice to have. You should still learn it though.
>>
>>57073280
sry was only in disagreement with

> but as I said, language choice == for majority path carieer choice

i think that only apply s to people that dont actually know the language they just write in it... (not making myself clear here sry)
>>
I know C++98, the new versions seem pretty unimportant to be quite honest.
>>
>>57069447
Because Rust is on the way
>>
>>57073218
So you are not any better than them, you are just a little above them in this zoo, majority of companies do not give a fuck about quality of code, because client is waiting for final product and unit tests/good practices means nothing to him.

You were also working in embedeed stuff which is a niche today and padi way lower than java pajeetism.

If you make fun of codemonkey I tought that you are working in cern/nasa/nsa, yo uare just gatekeeper of the zoo.
>>
>>57074835
I am from bombai btw
>>
>>57069511
As a C/C++ fanboy who went to school for embedded systems and is currently a C++ dev, I can agree with this.

I would rather fuck a goat than be caught using Java though
>>
>>57069447
>Cython
>>
>>57074125
C++11's auto keyword is useful for reducing some boilerplate code.

/* C++98 */
std::map<std::string, int> myMap;
std::map<std::string, int>::const_iterator pos = myMap.find(targetName);


/* C++11 */
std::map<std::string, int> myMap;
auto pos = myMap.find(targetName);
>>
>>57069447
It's not used in the real world, just like C or other meme languages like haskell.
>>
>>57075179
Boilerplate like that is only important on the micro scale.
>>
>>57075267
this doesn't even deserve a low quality bait.png
cmon man
>>
> 2016
> not using Rust

baka desu
>>
>>57075532
He is retarded, but C++ is generally being phased out/chosen less for new projects in favor of more modern languages (mostly java)
>>
>>57075746
>2016
>using Rust
I'll wait for them to make an iso standard
>>
>>57069511
It's only complex if you're an idiot in which case you shouldn't program either way. Honestly it's one of the easiest programming languages to learn and master. Definitely easier than java and not as annoying as python (muh white space). Not to mention it's compatible with many platforms just like C and has very fast code execution.
>>
>>57075767
Nah, it's mostly being phased out for Python or any other scripting language wrapping C for heavy lifting. Java is taking over for things that never should have been written in C++ in the first place.
>>
>>57075767
sure, but there are still plenty of areas where C++ is still rocksolid like
-heavy 3D rendering(Games, CAD etc.)
-embedded
-anything requiring assembly
-crypto(low level = more control, inline assembly etc.)
>>57076083
look up the apache software foundations project's, a lot of those are critical infrastructure written in java.
an example: https://en.wikipedia.org/wiki/Apache_Cassandra
>>
>>57072486
Actually writing CAD in javascript and a website in C would be quite easy
>>
this damn thread
so what?
I should stay away from C++ and just grab C#/Java book?
>>
>>57076298
To cut through all the memes and just state objective facts:
>Java has the most job listings by far and away.
>Java, C#, C++, C, Python, et al. all have jobs in the marketplace from entry level to advanced positions.
>C and C++ is more common in fields were the hired party is a technical degree holder, eg. engineering.
>Java positions are regularly staffed by immigrant labor that's not professionally qualified for much of anything.

So just by the by, it's factually accurate to say you will have a much easier time job-wise going with Java or similar unless you are coming out of a good CS program. That said I agree with the -opinion- that C++ makes you a better developer.
>>
>>57076527
>wasting a good post on this thread
Baka
>>
>>57076188
>heavy 3D rendering(Games, CAD etc.)
limited field
>embedded
limited, also >c++ for embedded
>anything requiring assembly
limited, probably better done in C anyway
>crypto
extremely, extremely limited
>>
>>57069447
JavaScript is better
>>
>>57071626
you just answered your own question

meanwhile Java is compiled to run on every system using the exact same compiler and has no platform-specific requirements whatsoever
>>
C++ jobs are really uncommon where I live, so I'm kind of stuck with Java and C#
>>
>>57069447
> who not
c++ is fucking terrible, wrapping all the complexity of low-level programming with all the delightful go-fuck-yourself's of oop.

> why
c++ at a place with very tight engineering standards / peer code review is like a breath of fresh air. I wrote a bunch at BIG RESPECTABLE TECH COMPANY and enjoyed it.
>>
>>57077548
>Javascript is better at being shit
Fix'd
>>
>>57077280
Pretty much this. I learned C++ in undergrad and something like 95% of us never used it after we graduated. For the few who use it, there's every reason to love it. Lots of power and potential flexibility. But for most of us literally any other mainstream language is a better idea.
>>
If you wanna be a gamedev, go C++. It's really the only industry where it's still widely used and pretty much required.

Otherwise, do Java or C#. If webdev, stick with Javascript.
>>
>>57078710
I don't know what to make of C#. MS is putting a hell of a lot of resources into it, but it's not growing nearly as fast as they advertise. I picked it up after six years of Java and misc. other languages and still haven't seen a decent paying job that requests it.
>>
>>57078738

side for Java, what are these miscellaneous languages that have decent jobs requests?
>>
Should I learn C# or C++? Not planning on making a profession out of programming, just for personal use and enjoyment. I also, of course, want shit to get done when programming and be able to work with the language.
>>
>>57069447
The language is so huge, the creator doesn't even know all of it.
You can utilize parts of the language and use only a subset of the language which a lot of C++ programmers do.
Learn the parts of the language that are useful to you at the time, and forget about the rest until you find a use for it later.
The trade off for low productivity is faster execution speed, and a smaller consumption of resources.
If you are new to programming, I would definitely suggest looking into another, higher level language that has lots of documentation.
>>
>>57078762
If it's just for a hobby, I would definitely suggest Python, there's lots of free documentation and learning resources out there.
It also has a wonderful IDE called Pycharm, with an educational edition which has a tutorial project.
>>
>>57078823
Okay, thanks.
>>
Shit thread, C++ is a god-tier language.
>>
>>57079534
It really isn't.
>>
>>57077971
>every
>>
>>57070792
>But c++'s runtime is far to simple for that
That's called zero overhead
>>
>>57078829
dont listen to that dumb fag go with c#
>>
>>57075532
Try getting a job and you'll see that everyone is using C#, Java or Python to get shit done and that's exactly why I meant by 'the real world'.
>>57075767
You're retarded.
>>
>>57079534
In the sense that nobody on earth really understand its behaviour?
>>
>>57077971
>meanwhile Java is compiled to run on every system using the exact same compiler
yes, but those systems need a JVM to actually run your code.
writing a JVM is much harder than writing a C compiler(or porting an existing one). Also, what language are you going to write your JVM in? The answer is usually C(++). And java compilation takes a significant chunk of processing power, to the point where android precompiles things. It's not noticeable on our desktop machines because those have big, powerful CPUs but on smaller systems it's certainly noticeable. Also, you can't really bootstrap with Java. So most platforms that support Java also support C, and there are certainly Platforms supported by C but not Java. Being able to run the same binary on all platforms is a comparatively minor point.
>>57078738
It's all about Control, Microsoft was in flames about Java's "write once, run anywhere" because Microsoft puts a lot of effort into making sure Software is Windows-only so people have to use Windows. So Microsoft made their own Java, and successfully managed to get Java away from the desktop.
>>
>>57082730
>It's all about Control
"Having 700 software engineers running around in the industry is an okay thing as long as Microsoft knows what they’re doing first." -Gates, to Intel
>>
>>57069447
it not, I spended most of my time learning it, and when I look back, I never actually used it in real life, except few CV projects back in collage, now I mostly use Python for the same stuff but its just a wrapper on top of C++ so when I need tweaking and stuff, Its really easy to do so.
>>
>>57082710
C++ is the king of DSP
>>
>>57082779
>dsp
>real world
>>
Sure, there are soul-crushing jobs for C++ devs. Also for cobol devs. I'd rather have a job using cutting edge tools like Rust

> inb4 invalid arguments against Rust from neets who never tried it
>>
>>57069447
Because it takes so much time you could use to learn something relevant to your future career. Unless you want to be C++ developer then you have to learn C++ anyway.
Shame C++ became such a clusterfuck, they should have dropped backward compatibility long time ago or mark deprecated every single thing that has better alternative in modern standards. I'm waiting for a day when Rust will replace all C and C++.

>>57083118
>job using cutting edge tools like Rust
They exists but there is so few of them. I'm applying for one at this moment.
At least companies like Dropbox start rewrites their code from Go to Rust. Let's hope this trend will stay.
>>
>>57083262
>memory safe language
>replace all C
wew lad
>>
>>57082779
... I think you mean asm
>>
>>57083331
Rust is not memory safe if you need it.
Lot's of places in standard library have memory unsafe code for efficiency.

The main idea is to hide unsafe code under safe interface that can be (mostly)statically proven correct and safe. This way you have performance of memory unsafe code without worrying about dangers of using it.
>>
>>57083262
>they should have dropped backward compatibility long time ago or mark deprecated every single thing that has better alternative in modern standards.
L E G A C Y
look at what happened to python
they're still not over the split between python 2 and 3
and python doesn't have remotely as many large codebases
>>
>>57082730
>yes, but those systems need a JVM to actually run your code.
Wrong, the same Android that you mentioned in your post actually uses JIT compilation

>The answer is usually C(++)
IIRC OpenJDK is mostly written in Java
>>
>>57084123
>The OpenJDK project produces a number of components: most importantly the virtual machine (HotSpot), the Java Class Library and the Java compiler (javac).
hotspot the JVM is C++
Java Class Library is obviously Java
javac is java
>Wrong, the same Android that you mentioned in your post actually uses JIT compilation
what? how is JIT not a JVM? the JVM is just a set of interfaces, how it's implemented doesn't matter. You could implement Java bytecode in hardware(and this has been done) and it would still be running "in the JVM". Whether not there is an actual translation layer doesn't matter, it's an abstract concept.
>>
>>57069447
Because you will probably fail
>>
>>57069511
This better be bait.
>>
>>57069447
It isn't C#.
>>
wait until c++20,22 or whatever for c++ to catchup with other languages.
Thread posts: 112
Thread images: 5


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