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
Because its the first coding language engineers learn these days
Logan Roberts
Better to remain silent and be thought a fool than speak and remove all doubt.
Andrew Bell
Because Sup Forums is college dropouts who code fizzbuzzes.
Daniel Morris
>butthurt pajeet
three rolls of toilet paper has been donated to you by Sir Oracle
Ethan Walker
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.
Connor Ortiz
because pointers and segfaults
Hunter Cook
> uses university classes as argument ayyy lmao
Jeremiah Wilson
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.
Luis Baker
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.
Owen Fisher
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.
Elijah Jackson
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.
Jordan Jenkins
>tfw I did a fizzbuzz for /gee/ :^)
Dominic Robinson
My Computer Engineering programme introduced us to Python, Java, functional languages, C++ in that order (+ some other non-important languages)
Alexander Nguyen
>functional languages I'm interested to know what functional languages did you learn in your CE programme.
Easton Harris
Haskell mostly and logical programming with Prolog
Levi Gutierrez
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.
Blake Moore
>using the smiley with a carat nose
Jayden Long
Complain about that instead on
Ryder Flores
not literally undecidable. Just not decidable by most academic grammars.
Austin Cooper
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.
Wyatt Bell
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.
Daniel White
>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;
Elijah Barnes
>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++
Logan Bailey
>pajeet >not shilling java
Austin Ramirez
>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.
Kayden Martin
OP is missing return 0; :^)
Jack Baker
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
Jaxson Kelly
> (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
Jason Ross
It would be void main() if there was no return value
Gavin Sanchez
In both C++ and C99, reaching the end of main() without a return statement implicitly returns 0.
Charles Robinson
What is the point of learning C++ if any job offer is Senior C++, min 10 years of documented experience
?
Cooper Bailey
/thread
Jaxon Phillips
good to know
Hunter Wright
What's the point of living if we're going to die eventually?
Asher Wood
>#include and other dumb preprocessor bullshit Trash.
Justin Carter
>more lines = harder
Are you stupid?
Aiden Perry
because java is obsolete garbage?
Jacob Carter
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.
Dylan Young
>template type for a template type
Adrian Ortiz
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.
Leo Rogers
>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.
Robert Ross
>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.
Ethan Morgan
no it's not, it's like saying Java isn't functional because it supports other paradigms despite having closures
Eli Adams
I'm curious as to what about Scheme disqualifies it from being functional in your eyes?
Ethan Rodriguez
Curly bracket languages are too hard for me.
I prefer "scripts" which just run commands line after line.
Eli Nelson
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.
Justin Morris
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.
Angel Torres
what's a good compiler?
Chase Hill
>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.
Parker Wood
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?
Justin Jones
>in all non-functional languages lol
Juan Long
In my uni we started with C and then java
Leo Myers
>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
Christian Sanders
You mean void main(void)
Parker Phillips
I think he was referring to constexpr.
Jonathan Hernandez
thats what man pages are for.
Adrian Kelly
>Short introduction to ASM on some god-forgotten controller >(only two working thingies exists in whole university to test program on real hardware)
Probably the management of memory makes C++ hard than Java. Not really hard for me though.
Gavin Rodriguez
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.