[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
Best Language
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: 94
Thread images: 10
File: Java.png (104 KB, 1222x804) Image search: [Google]
Java.png
104 KB, 1222x804
Was arguing with someone over in /v/ about whether Java is better than C++ (it obviously is, he's a total idiot). What do you guys think of my reasoning:

Java is a higher level language, which makes it not only easier to use, but also much more aesthetically pleasant than C++. Also, it's still an incredibly powerful language (quite possibly more so than C++). No one uses C++ anymore, it's on its way out.
>>
>>54282726
>aesthetically pleasant
>incredibly powerful
How about some actual benefits like "Java is write once run everywhere" or "C++ allows for manual memory management"?
>>>/v/
>>
They're both better than the other at different things. Learn both and kill yourself for making yet another "which language is better" thread.
>>
>>54282760
Amen brotha
>>
>>54282752
These are important factors. If you're going to be writing in a language for eight hours a day, it better look nice. It's also VERY important for it to be powerful, ya idiot.

>>54282760
Java is better across the board. Do some research. That's like saying Visual Basic is better than C++ at some things.
>>
>Java
>aesthetically pleasant
>>
>>54282788
Look at this screenshot. Just try and tell me this isn't BEAUTIFUL.
>>
>>54282788
They both are an abomination of nature
>>
C++ tried to surpass C and failed. Yet it's still much in use for gaems.
Java tried to be one language for all systems and failed. Yet it's still in much use for work.

Both languages suck. PHP master race.
>>
>>54282726
>Java is a higher level language, which makes it not only easier to use, but also much more aesthetically pleasant than C++.
C++ is a multiple paradigm language. Apart from garbage collection, it's just as good for high-level programming as Java is, it just has better support for low-level stuff as well.
>>
>>54282726
PAJEET MY SON
>>
>>54282726
>Java
>aesthetically pleasant
write some C# to see some actual good looking managed code. Java is ugly af
>>
>>54282821
That looks like partially obfuscated Javascript, not Java.
>>
>>54282832
Wrong. Anyone with even a rudimentary understanding of programming can tell you that Java is far better for both lower level and higher level.

>>54282847
C# is terrible. One of the ugliest languages out there.

>>54282851
This is Java. See OP before commenting.
>>
>>54282726
Java Pros:
JVM has improved over the years. Long running programs with repetitive actions can often be optimized by the VM to perform really damn well.
JVM and the java byte-code makes language interop for other JVM-hosted languages a breeze (Scala, Clojure, others.)
Java is fairly portable to an extent.
Cons:
Write once; debug everywhere. Not all JVMs are equal and you can't guarantee that your code is going to behave the same across all platforms running it.
Overly verbose. Way too much boilerplate to get basic shit done.
Everything is an noun (object). Not all situations which are being reasoned about in software consist of objects. OOP is not the best paradigm for all projects and Java likes to force it down your throat.

C++ pros:
Able to natively compile to the platform you're targeting.
Backwards compatible with C and able to embed asm for when you need to go Gran Autismo.
New standards bringing in higher-level constructs to make programming not an absolute chore in it.
Doesn't force paradigms down your throat. You're free to do pretty much whatever retarded shit you please.
C++ cons:
Also verbose.
Every rule has an exception. Every exception has an exception.
Linking and compilation system is old and busted.
Backwards compatible with C; keeps some old wtf-constructs in the language.
Not a Lisp.
>>
File: RTcHUf.gif (660 KB, 320x180) Image search: [Google]
RTcHUf.gif
660 KB, 320x180
>>54282839
>>
>>54282870
>Java is far better for both lower level and higher level.
How do you do low level programming in Java? It doesn't even support pointers or manual memory management.

>This is Java. See OP before commenting.
Yeah, I looked at the OP, that's what I based my judgement on. Usually the only time I see code that lacking in whitespace is in optimized JS code in websites.
>>
>>54282906
tl;dr Classic C++ programmer

>>54282916
Java has alternatives to pointers and manual memory management. Do you even have a basic knowledge of Java?
>>
Maki's delicious poop!
>>
>>54282952
>tl;dr Classic C++ programmer
>post was leaning towards Java being slightly better
>both languages still pretty shit
>>
>>54282726
>browsing /v/

FUCK OFF
>>
>>54282952
tl;dr fuck off delusional cunt
>>
>>54282974
Coming from someone browsing /g/? That's ironic.
>>
File: 1460866596150.png (419 KB, 719x930) Image search: [Google]
1460866596150.png
419 KB, 719x930
>>54282870
>Java is far better for both lower level and higher level.
so your just a troll
>>
>>54283017
*you're, ya idiot.
>>
this is some obvious bait and both languages are Pajeet tier
>>
>>54283040
Yeah, but you guys have too much pride not to argue it. See previous comments.
>>
>>54282991
>implying /v/ is more respectable than /g/
>>
>pajeet code monkey language
>compiles to byte code that runs on the jvm

>compiles to machine code
>lets you have functions outside of classes
Wew first one is superior clearly
>>
File: enhanced-31803-1406584309-2.jpg (24 KB, 498x320) Image search: [Google]
enhanced-31803-1406584309-2.jpg
24 KB, 498x320
>>
>>54283057
/g/ is a bunch of neckbeard, Stallman wannabes.
>>
I love how this thread is literally made to bait and people are still eating this up
>>
>>54283087
I've already agreed about the bait. Like I said, you guys will argue anything.
>>
>>54283083
And that's somehow worse than the people who post on /b/ 2.0?
>>
>>54283073
>>lets you have functions outside of classes
That's not really a meaningful distinction, since Java defines the MAIN PROGRAM as a class. It's just semantics - the function may be inside a "class", but you don't need to actually instantiate the class or anything.
>>
>>54283176
/v/ has some good video game discussion. /g/ on the other hand is just kind of a pit of despair.
>>
>>54282780
Java looks awful. Not being able to use Java 8 lambdas, Java 7 try with resources, the new Joda time library and more features because of the Android runtime sucks too.
>>
>>54283196
When you reference a static method inside a class, you instantiate the class to be able to call that method. Is done by you behind the cover.
>>
I like Rust
>>
>>54282726
You're both retarded. Java beats C++ at some things (most things, arguably) but C++ beats Java at other stuff. Know both.
>>
>>54283437
Name one area where C++ is superior to Java.
>>
>>54282780
>Java is better than C++ across the board

Ok, what about EVERY SINGLE FUCKING WINDOWS APPLICATION THAT USES OOP? Or some operating system features? Seriously, fuck off, this isn't the board for you.
>>
>>54283454
Game and Windows Application development
>>
having a VM for C# was the biggest mistake M$ did

look at F#, that shit is based and compiled straight
>>
>>54283471
How does F# compare to Scala? I'm learning Scala this quarter and love it, but it seems like most of the rest of the world doesn't
>>
>>54283462
Java could do those things, if Microsoft wasn't suppressing it because of their greed.
>>
>>54283454
Definitely wins in things that need to be computed fast and are not being sold. For example, a chess engine would be VERY useful in C++. A lot of video games are also coded in C++.
>>
>>54283499
FUCKING KEK

I'm done talking to you.
>>
>>54282780
Sounds like you just contributions to your own opinion but lack the ability to formulate your own.

>Better
>Across the Board
>Aesthetic
>Powerful

>>54282870
>Wrong
>Rudimentary
>Better
>Higher Level

>>54282952
>Alternatives to pointers
>Memory Management
>do you even lift metaphor

>>54283054
Argue what? I have no need to rationalize anything that I have no intent to see through. Who cares what you and your friend think.
Too much pride? What are you? Female?

>>54283202
Have you noticed how all your posts go from pivot to rest?
>>
>>54283570
>"you just *want contributions to your own..."
>>
>>54283570
tl;dr Typical C++ programmer.
>>
>>54282726
Who cares? They're both shit languages. It's like the pot calling the kettle black.
>>
>>54283625
>>54283625
But I code in all C types..I even started in Java. Also, you haven't even mentioned the JVM once.

This sounds like Jauregui.

You know an interesting tid bit about your rhetoric that you may be failing to catch? C++ forces you to manage your own development space and user space for better performance. Like cleaning your own home and organizing it to work for you specifically. Java does so through a standard, like Martha Stewarts Housekeeping tips, the way a new mother does when "learning" how to be a good mom.

So, you are here, among neets, advocating that living with a mother who organizes everything and cleans for you is better than living and working on your own terms...

What exactly are you arguing?
>>
>>54282752
>"Java is write once debug everywhere"
FTFY
>>
>>54283702
Seems pretty simple: Java > C++
>>
>>54282821
On second thought, it's not that beautiful.
>>
>>54283743
THIS IS NOT THE REAL GREG. I AM THE REAL GREG.
>>
>>54283781
Yes, exactly. I am the real Greg.
>>
>>54283791
If you're the real Greg, then what's you mother's maiden name?
>>
>>54283821
Greg
>>
Hi guys, I'm Greg
>>
>>54283861
Lucky guess.
>>
There's no Greg here
>>
Okay, this is the REAL Greg signing on. Please ignore the pretenders.
>>
File: bait bomb.png (479 KB, 625x626) Image search: [Google]
bait bomb.png
479 KB, 625x626
>>54282726
>how_to_troll_g.jpg

eh, 6/10
>>
Nobody gives a shit about this. Javascript will kill Java. C++ will only survive because of its low-level capabilities.
>>
>>54282726
>I know only Java and C++

I hope you are enjoying your first year of college
>>
>>54283938
Come on, I thought this was quality.
>>
>>54282780
>Java is better across the board
Go write a kernel in Java
>>
File: 1461855434364.jpg (831 KB, 1600x1067) Image search: [Google]
1461855434364.jpg
831 KB, 1600x1067
>>54282726
shitty bait from a shitty OP
>>
>>54284063
It's high quality bait. You just don't get it, ya pleb.
>>
>How do you do low level programming in Java? It doesn't even support pointers or manual memory management.

Nobody, but cell phone manufacturers really do this anymore, but Java used to be on really low-level 8-bit devices too.


>TINI (for TIny Network Interface) is a complete TCP/IP node with a Java JVM all on a $50 SIMM module produced by Dallas Semiconductor. The controller is the DS80C390.

>TINI includes Flash, NVRAM, ethernet, RS232, CAN and iButton, plus a Java JVM, all on board. All it needs is power and connectors.
>>
>>54284359
The firmware developer and everyone else at my startup would laugh you out the interview if you suggested using anything besides C for the firmware since that would more than triple the cost of each deployment because of the ridiculous amount of memory you would need for the JVM alone
>>
>>54284492
I agree with you. I write in 'C' for embedded stuff. Just pointing out that you can use Java on even a lowly 8051 if you are determined. I had one of those things. It actually worked pretty well for what it was.
>>
>>54282916
>How do you do low level programming in Java? It doesn't even support pointers or manual memory management.
there's no need. "low level programming" in practice is basically writing menial boilerplate memory management code and the gc takes care of that. you could sun.misc.Unsafe or memory buffers, if you really want to manipulate the memory manually, but no one in his right mind does that
>>
I'd argue that C++ is MUCH more 'powerful' than Java. That's not the only metric that matters, but saying Java is more powerful is not correct.
I will provide code examples but I'm not sure if you actually know C++, if you think it is less powerful than Java.

IMO, Java is too low level. It's held back but stupid design decisions made to make it slightly lower level. Obviously C++ is more low level but that's because it's meant to be. Java is in a stupid limbo.
>>
>>54283471
>look at F#, that shit is based and compiled straight
that's interesting. I thought F# was one of the CLR languages
>>
File: 2.png (646 KB, 1920x1080) Image search: [Google]
2.png
646 KB, 1920x1080
>>54283950
I only know Java and have been working as a programmer for years
>>
File: bjarne.jpg (67 KB, 200x245) Image search: [Google]
bjarne.jpg
67 KB, 200x245
>>54282726
"Many programmers come to care passionately about apparently minor details of language syntax and semantics. C++ is in many ways a very nice language, but it is not perfect; neither is any other programming language."
-Bjarne Stroustrup
>>
>>54284897
what is this hairstyle called?
>>
>>54282752
>"C++ allows for manual memory management"
>actual benefits
/g/ once again confirmed for never creating anything complex or useful
>>
>>54284897
does anyone have the cartoon with bjarne saying "C++ is a superset of C, there is simply no reason to be using C" ?
>>
>>54284918
too pussy to just shave his head
>>
>>54284955
I actually like it. I can't name any other person with the male pattern midlength bowl cut.
>>
>>54284955
but hiding the baldness by shaving your head is the pussy way out
>>
>>54284937
It's true
>>
>No one uses C++ anymore
'cept perhaps the Java Virtual Machine.
>>
Absolutely fucking not.

Being a higher level language does not necessarily make it easier to use. Nor does it make it more aesthetically pleasant (which is a subjective measure anyway).

I've done jobs in C++, Java, C#, Javascript/HTML?CSS. Java is the worst of that bunch.
>>
>>54282726
>Java is a higher level language, which makes it not only easier to use, but also much more aesthetically pleasant than C++. Also, it's still an incredibly powerful language (quite possibly more so than C++). No one uses C++ anymore, it's on its way out.

It depends what you are going to do with it.
>>
File: 1456428206925.jpg (67 KB, 500x600) Image search: [Google]
1456428206925.jpg
67 KB, 500x600
>>
>>54285282
the oop thing looks like it can actually be useful, the kite is trivial and boring
>>
>>54285166
J A V A ! B T F O
A
V
A
!
B
T
F
O
>>
>>54285282
>C
>minimalism
lol. even the simplest tasks like reading from a text file require to write a fucking litany
>>
>>54285389
doesn't just shift into filename?????

in java you'd need at least a FileWriter and to set it within a try block...but small tasks like this are not what programming is for. That's why you have a terminal.
Thread replies: 94
Thread images: 10

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.