Why do people keep meme'ing about C++ being hard?

Why do people keep meme'ing about C++ being hard?

I have taken three university classes that focused on Java up to the point of design patterns, graphics, networking and so on. Now when I look at C++ everything seems so much simpler than Java source code.

Even writing a fucking pong game in Java requires 300+ lines while C++ and SFML could do it with 100 lines


>inb4 le pointers are hard

Other urls found in this thread:

mouser.com/ProductDetail/STMicroelectronics/STM32F411E-DISCO/?qs=sGAEpiMZZMsuSxY5Q00ZedbvPWiWbLffg8xP%2bgE1viE=
twitter.com/NSFWRedditGif

Because its the first coding language engineers learn these days

Better to remain silent and be thought a fool than speak and remove all doubt.

Because Sup Forums is college dropouts who code fizzbuzzes.

>butthurt pajeet

three rolls of toilet paper has been donated to you by Sir Oracle

To be honest, both Java & C++ are over-utilized in the workplace.

There's a plethora of projects that started in the mid-90's to do cool shit like "host internet content!!" and they're written in fucking Java.

These languages are absolutely amazing if there's a use case that requires high performance, high security, full control, strict typing, etc.. etc.. but most projects written in Java & C++ are pieces of shit that could've been written with whatever is the easiest & dumbest language they're teaching over at ASU right now.

because pointers and segfaults

> uses university classes as argument
ayyy lmao

Well for starters, the grammar is literally undecidable, and compilers have a tendency to shit out the most indecipherable of error messages, making it rather confusing for beginners.

C is easy.
C++ will throw you for a bit of a loop.

related pic, which express verboseness of Java by comparing a well-commented Java code with a simple C++ code, is weird. If you write C++ code with doxygen comments, the length would be as same as that of Java.

Mostly due to the fact in java everything is a object and thus just simply infect a lot of the metal thinking and decomposition of a problem.

Hell no-one in java agree's what a object is in the first place anyway. There was a great discussion on HN a couple of days ago where everyone was debating is OOP message passing or not, or what it means to do OOP programming.

So unless you can quantify what the hell people mean by OOP its kind of pointless. This kind of bring me back to my original point that in Java their mental model is everything has to be a object and encapsulated, and abstracted away.

Though the whole notion of abstraction, encapsulation, sub-typing, modulation is just simply design and has nothing to do with OOP.

well at my uni (and it's not a bad one) we studied pseudo code, and principles first. then java. and in the end, C++ with it's unholy spaghetti mess of code.

meh, I was not bad with C++ but it's kinda useless today.

>tfw I did a fizzbuzz for /gee/ :^)

My Computer Engineering programme introduced us to Python, Java, functional languages, C++ in that order (+ some other non-important languages)

>functional languages
I'm interested to know what functional languages did you learn in your CE programme.

Haskell mostly and logical programming with Prolog

No scheme... :(. Technically scheme isn't functional language, but it include features of functional language.
Don't Recent CE classes teach student about LISP-dialects? I'm sorry about that.

>using the smiley with a carat nose

Complain about that instead on

not literally undecidable. Just not decidable by most academic grammars.

C++ can be object oriented, if you let it. It can be strictly procedural if you let it. It has probably the most complex type system of any language. It supports ducktyping at compile time. You can write 100 lines that compile down to a single instruction when its possible, and as many as needed when it can't. Its a lot of things. Its simple in that you can write code very efficiently like OP describes, but hard in that people may write in very different styles (like fundamentally different) and there's more mechanisms to learn in order to understand the various styles than I suspect you find in most programming languages.

A horror, a horror.
We started with C subset of C++ in first year, then classes, templates and all this shit. Short introduction to ASM on some god-forgotten controller (only two working thingies exists in whole university to test program on real hardware). I believe it was 3rd year when we actually got cool stuff.

>100 lines compile to one instruction.
What kind of code does that?
inb4 1 | i += 1;
2 | i +=1;
3 | i += 1;
4 | i += 1;
...
100| i += 1;

>Java requires 300+ lines while C++ and SFML could do it with 100 lines
>use a library for C++
>don't use one for Java
lmao, nice comparison there, retard
either slap a library onto Java or make it in pure C++

>pajeet
>not shilling java

>and compilers have a tendency to shit out the most indecipherable of error messages
Stop using shit compilers like GCC that are made by literal autists.

OP is missing return 0; :^)

Returning is optional according to the standard.
If you want to whine, at least do it right and whine because the main function doesn't have arguments either

> (OP)
>in java everything is a object

Why do people keep saying that when it's so far removed from the truth. Primitives aren't objects, null isn't an object, methods aren't objects, classes aren't objects. Boxing doesn't count.

What you should say is all code is in classes — and probably eleventy bajillion xml files that will let you have type errors at runtime, so what's even the point

It would be void main() if there was no return value

In both C++ and C99, reaching the end of main() without a return statement implicitly returns 0.

What is the point of learning C++ if any job offer is Senior C++, min 10 years of documented experience

?

/thread

good to know

What's the point of living if we're going to die eventually?

>#include and other dumb preprocessor bullshit
Trash.

>more lines = harder

Are you stupid?

because java is obsolete garbage?

because java is a mess so that dumber programmers can use it. Its a basterdization between an interpreted and compiled language so that you dont have to handle everything yourself.
C++ is the best since you are in control of everything. Its the closest you can get to writing assembly without actually writing assembly.

>template type for a template type

Because C has a steeper learning curve than Java, that is all. Once you get the hang of programming, you can get into new languages pretty quick.

>generics (look at the STL)
>function literals in the 2014 standard

You've never coded assembly have you. The real benefit C, C++ and D offer for it is having compiler directives that are implementation dependent allow you to write lines of it that are assembled along compilation. The language features for even C themselves bar goto and the awkwardness of switch statements are pretty divorced from how say, x86 would handle the equivalent statements.

>Technically scheme isn't functional language
Saying Scheme isn't functional is a bit like saying Java isn't Object Oriented due to the presence of its primitives.

no it's not, it's like saying Java isn't functional because it supports other paradigms despite having closures

I'm curious as to what about Scheme disqualifies it from being functional in your eyes?

Curly bracket languages are too hard for me.

I prefer "scripts" which just run commands line after line.

The fact that it supports other paradigms equally or better than functional programming. First-and-foremost it's a multiparadigm language, especially because it's so flexible that it allows you to create new syntax for different paradigms at the blink of an eye.

It is a multiparadigm language. But to deny that Scheme has a particular emphasis on functional programming is pretty foolish. Sure, it's not purely functional, but few languages are. It seems awfully pedantic to split that sort of hair. Hell, if you google Scheme the summary is "Scheme is a functional programming language..." While hardly a source of truth, most Scheme programs have a decidedly functional style.

what's a good compiler?

>Why do people keep meme'ing about C++ being hard?

Because it much easier to fingerprint coding styles in C++ so cheaters (99.5% of CS majors) fail their assignments.

I can't decide which language to use. I can code in all non-functional languages but I'm constantly googling shit like "array in c#, length of array c++, substring c++, linked list java" shit like that.

Does everyone do that? What do?

>in all non-functional languages
lol

In my uni we started with C and then java

>I can code in all non-functional languages but >I'm constantly googling shit like "array in c#, length of array c++, substring c++, linked list java" shit like that.
no you cant

You mean
void main(void)

I think he was referring to constexpr.

thats what man pages are for.

>Short introduction to ASM on some god-forgotten controller
>(only two working thingies exists in whole university to test program on real hardware)

mouser.com/ProductDetail/STMicroelectronics/STM32F411E-DISCO/?qs=sGAEpiMZZMsuSxY5Q00ZedbvPWiWbLffg8xP%2bgE1viE=

$15

Fifteen Dollars

Ten and five United States Amero-doos.

/thread

Probably the management of memory makes C++ hard than Java. Not really hard for me though.

If you don't spend 40hr a week in a language then you're not going to remember every nuance of the syntax nor all the available classes and functions. Shit, even when you do you wind up spending time looking shit up in the manual.

When you jump around languages it's much worse.

Every language designer, every framework author, every fucking library programmer has their own naming conventions and unique variations of common design patterns. There's no way to remember every last damn thing. That's why auto complete became a thing in IDEs, not so much in word processors.

The important thing is that you know what you need, can quickly find the name(parameters) in the language you're using, can recognize and work with the various design patterns and APIs, etc.