[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 do people bitch about Java being slow when Python is slower,
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: 246
Thread images: 17
Why do people bitch about Java being slow when Python is slower, and they favour Python over Java?
>>
Stop listening to every little post you read on /g/ fag
>>
>>54314098
Groupthink.

Java's actual problem is memory usage.
>>
>>54314098
because Python is the baby's first language and they don't know shit about programming beside /g/ memes. Java is probably the fastest language that isn't compiled straight to the machine code and the speed difference compared to C is negligible in 99.999% of real world tasks.
>>
>>54314098
>Python is slower

probably because nobody in their right mind cares about meymey snek.
>>
>>54314208
Well put. I mesured time between C and Java, its a really small difference. Java is lighning fast.
>>
>>54314208
>>54314223
>hating on python
How's Calc I treating you?
>>
Most folks get the "Java is slow" idea from the startup delay of the JRE. Clunky Swing default look n feel doesn't help either.
>>
>>54314098
People bitching about Java being slow are just retarded memesters. It's a shit language nonetheless, but for different reasons.
>>
>>54314261
Which reasons?
>>
>>54314223
I don't hate it. I actually recommended it to my brother who wants to learn programming, but it's become too much of a meme and is way too widely used.
>mfw most "hacking" books use python now
>>
>>54314258
swing sucks, swt is bae
>>
File: 1452928617945.jpg (22 KB, 225x225) Image search: [Google]
1452928617945.jpg
22 KB, 225x225
>>54314234
i already finished calc 3 thanks
>>
>>54314098

Java encompasses a single paradigm and forces it down the users throat.

Java's reliance on a VM gives it a single point of failure.

It's difficult to optimize, let alone fix, legacy Java code since it may rely on prior domain knowledge that is no longer known.

There's lots of reasons why its bad, not just "hurr durr VMs are slow"
>>
>>54314488
>Java encompasses a single paradigm and forces it down the users throat.
I seriously hope you're not implying Java is purely object oriented. I'm not even talking about the Java 8 features
>Java's reliance on a VM gives it a single point of failure.
what are you even trying to say?
>It's difficult to optimize, let alone fix, legacy Java code since it may rely on prior domain knowledge that is no longer known.
which is true for legacy code written in literally any language. at least in Java you can be sure the legacy code won't break after updating the Java version
>>
>>54314098
Because we know Java users can't handle bantz or the fact that Python's growing. They will deny it all the way to their shit-filled streets
>>
Java is almost as fast as native code. It just takes a lot of memory.

My guess this meme comes from Minecraft, people usually thinks it's slow because of Java when in fact it's slow because Notch is a shit programmer who can't write performant and efficient code. Notice how the Xbox360 port was written in C++ and runs well on a massively under powered platform.
>>
>>54314116
This

There's nothing wrong with Java if the programmer isn't a pahjeet.
>>
>>54315011
But the only people who write Java are Pajeets.
>>
>>54315043
this
>>
>>54315051
You're missing a semicolon.
>>
>>54314122
>2016
>worried about memory
>>
File: 1382214279660.jpg (86 KB, 640x479) Image search: [Google]
1382214279660.jpg
86 KB, 640x479
>all these discussions about speed
In how much code does it __really__ matter?
If you don't do numerics or low level OS stuff, what the hell does speed matter anymore on a language level? Might as well argue about
i = i+1
vs i++ vs i += 1 while you're at it.
Time needed to accomplish a task, read code and the like is time worth anything.
>>
>>54314994
The meme is far older than Minecraft even tho Minecraft surely contributed to its continued survival.
Early JVMs were actually slow and secondly, Java one of the first languages for many inexperienced developers.
Also the warm-up time of the JVM is actually slow, until the JIT has compiled all the code. Only then is it fast
>>
>>54315043
maybe in 'murrica, but soon every job position there better than being a garbage collector will be taken by a brown person so it's not really relevant to the discussion.
>>
>>54314258
>using Java to write GUIs

How was freshman year?
>>
>>54315134
There's nothing wrong with writing simple GUIs in Java. It's incredibly convenient to distribute a .jar file that just works on OS X, Windows, GNU, BSD and other systems
>>
>>54315111
This desu. If your code isn't gonna be scaled and you aren't writing for constrained-resource systems then speed literally doesn't matter.
>>
>>54315176
nice meme
>>
>>54315043
but minecraft modders..
>>
My favorite thing is when people benchmark simple programs in C/C++ and compare them to Java/Python while ignoring all the type safety checks which are inherent in "bloated" languages.

"oh look, if i added all the features C/C++ are missing this program would be 500 loc longer and would take just about the same time to run"

Mathematicians and engineers are the ones who compare stock C/C++ to stock Java/Python as if it's really apples to apples. Shysters, the lot of them.
>>
>>54315176
>that just works on OS X
OS X stopped shipping a JRE out of the box. Linux and BSD don't usually come with one either.

Java is dying in the consumer sector, and it's not going to be long until the enterprise sector follows.
>>
JDK on windows is an abomination and swift is even worse. It's not hard to see why Java got a bad reputation with laymen.
>>
The majority of people who spend time talking shit about languages are shit programmers who confuse using trendy languages/tools for being skilled.
>>
Maymays.


Same as people thinking Common Lisp is slow and bloated when that was only true with respect to 1980s standards.
>>
>>54315382
pajeet pls
>>
>>54314488

It's difficult to optimize because the JVM does it for you. It's incredibly hard to beat the JVM.


You don't need to optimize Java, it's all optimized.
>>
>>54315108
I've had the jvm run out of memory when writing enterprise software. I wound up having to rewrite my code in such a way as to trick the garbage collector into working when I needed it to because java doesn't let you manually free shit when you're done with it.
>>
>>54315848
>I wound up having to rewrite my code in such a way as to trick the garbage collector into working when I needed it
you mean not holding unused references? :^)
>>
>>54314208
>>54314225
>Open java application
>An hour later I get a response, everything feels slow as fuck
>Open C/C++ application
>Instant response everywhere
yeah brah java just as fast as C xD
>>54314098
faster to do small shit in python (and most interpreted languages) than in java.
>>
>>54316468
nice anecdotal evidence you got there
>>
>>54314098
dat pic
if emma watson was born male
>>
I work at a fuckhuge company where Java has the most official tool/framework support, though just about every other major language has a foothold too.
Java's actually pretty goddamn fast (the JVM is incredibly optimized at this point) and can be made faster with various optimization tricks / common-sense code profiling/auditing, and it handles parallelism and scaling way better than Python or Ruby does.
Everyone generally hates it though, and the main complaint I constantly hear about it is that it's way too verbose and static.

Node.js is the new hot thing. It blows my mind that a typeless language which was once used to add popups to grandma's GeoCities page is now powering massive distributed computing clusters for basically everything, but we as lowly boots-on-the-ground developers don't have much of a say in what the next new hot trend is going to be.
>>
java isn't a language meant for performance, it's actually a miracle that the JIT code is as fast as it is. thanks to java's retarded memory model (each object is allocated at a different spot in the jvm's heap memory, you have no control over the order of things in memory, etc) it just becomes cpu cache miss hell which ends up bogging down any large program.
>>
>>54314208
>the speed difference compared to C is negligible in 99.999% of real world tasks
how many game engines are written in java?
>>
>>54315848
In the vast majority of low-scale software projects if there are memory issues it's a smell of bad design or implementation more than anything.

If you're performing complex processing on large (>1TB) datasets across multiple tables/sources/entity types, memory issues also tend to point to a need for better parallelism, but if the problem absolutely won't allow for it, there are still ways to better manage memory.
>>
>>54316540
https://en.wikipedia.org/wiki/List_of_game_engines
a few. using video games as an example when talking about performance is a bad idea. game devs stopped caring about performance and optimization years ago
>>
>>54314098
It's easier to learn
>>
>>54315111
And this is your answer to why is Python used so much. There are a lot of reasons for you to ignore the flaws of the language but the, flaws, when they do matter are reason enough to use the Cs instead of Java. Like in embedded programming and possibly games.
>>
>>54314098
Interpreted and JIT languages are expected to be slower than compiled language. It's really how fast a language is compared to others in the same class that counts.
>>
>>54316652
https://benchmarksgame.alioth.debian.org/u64q/java.html
I think it's doing alright even against compiled languages
>>
>>54314683
>I seriously hope you're not implying Java is purely object oriented
You need to define a class to write Hello World. If that's not pure OO, I don't know what is.

>>54315134
What language would you write GUIs in?

>>54315559
wew lad
>>
>>54316626
So because they stopped caring about performance, we curved the scale?

What kind of faggotry is this? It just means games perform like shit now. That example still stands, sadly, though it will be treated as an ideal. Like staying below 170 lbs. Like drinking 5 cups of water. 1 apple a day. Politeness. Efficiency.

We should just let Japan keep popularizing things and catch up to them. It's the only way we will continue to develop great things. Ever since America, Korea and China became technological super powers we have been in a shit heap decline to overhead with some computation.
>>
I'm an Oracle Certified Master.

AMA.
>>
>>54316729
Why are "high" and "very high" the only available security settings for Java applets in the browser? Why can't their be a minimum security option at the user's own risk so they can run applets without having to manually add them to the exception list?
>>
>>54316683
>You need to define a class to write Hello World. If that's not pure OO, I don't know what is.
it has nothing to do with being pure OOP. Java isn't a pure OO language because, for example, it has primitives and allows to perform operations on object outside the objects' methods
>>
>>54316683
>You need to define a class to write Hello World. If that's not pure OO, I don't know what is.
Not objects in Java:

Functions, integers, floats
>>
>>54316781
applets are officially deprecated and nobody cares about them anymore, Senpai
>>
>>54316800
Your main program is a class.
Thus functions, integers and floats are members of an object.
>>
>>54316781
Because Java in the browser had a nasty reputation of being a very popular attack vector, to the point that security companies started threatening to block Java plugins entirely.

Chrome ditched it and Firefox is planning to do the same soon, so it won't be an issue for long.
>>
>>54316497
you're sticking your head in the sand. you're fucking retarded. just try minecraft if you're not convinced.
>>
>>54316811
So then how are you supposed to run Java then? Download whole programs and run them offline? Wasn't running stuff in your browser one of the main selling points of Java?
>>
>>54316816
>Thus functions, integers and floats are members of an object.
The functions, integers and floats THEMSELVES are not objects. They are in pure OO languages like Ruby
>>
>>54316824
Isn't Memecraft written in sepples now though?
>>
>>54316837
It's still impossible to write a valid Java program that doesn't use objects. Whereas it's entirely possible to do that in a language like C++.
>>
>>54316824
try looking at actual benchmarks instead of throwing around retarded anecdotes, shitface
>>
>>54316849
How thick are you?
That doesn't make Java a pure OO language..

https://en.wikipedia.org/wiki/Object-oriented_programming

Languages called "pure" OO languages, because everything in them is treated consistently as an object, from primitives such as characters and punctuation, all the way up to whole classes, prototypes, blocks, modules, etc. They were designed specifically to facilitate, even enforce, OO methods. Examples: Eiffel, Emerald, JADE, Obix, Ruby, Scala, Smalltalk, Self.
>>
>>54316852
>i need someone else to tell me how responsive a program is, i can't do judgments by myself.
>>
>>54316824
Minecraft is where 90% of the Java-bashing originates from, when the truth is, shitty code runs like shit regardless of what language it was written in.
You don't blame the hammer when a carpenter makes a shitty cabinet, so don't blame Java when Notch writes shitty code.

>>54316828
Not since the 90s and early 2000s.
You can distribute the application as a .jar.
>>
>>54316823
Yeah, then why didn't they just remove the lower options and call the two remaining options "normal" and "high"?

I think that is what we he meant to ask with his question. I'm supposed to trust developers that were too lazy to write new code and just added in a call for the slider's disable?
>>
>people still conflate "Java" with Java applets
>>
>>54316828
>So then how are you supposed to run Java then? Download whole programs and run them offline?
yeah, but Java is mostly used on servers.
>Wasn't running stuff in your browser one of the main selling points of Java?
in mid-nineties. applets died completely over a decade ago
>>
>>54316875
>i could totally write Minecraft as fast as C++ in Java
you're ignoring the fundamental reasons why virtually all java programs will be slower than their comparative C++ programs. do you even know what a garbage collector is?
>>
>>54316876
Yes, and furthermore they infringe on the user's freedoms in the name of "safety". If I understand the risks and want to run an insecure applet, I should be allowed to.
>>
>>54316837
There is exist wrapper classes for integers and floats. I believe function has a wrapper class or at the very least a template class. The JVM then uses that info to create assembly code.

It's purely OOP, anon. Whether you can argue the semantics for a fault in the matter really just stands to other model comparisons. Or did you forget that Java is practically a subset of another language?
>>
>>54316896
You're missing the mark.
Minecraft runs like shit because it was written like shit, not because it was written in Java.

If written correctly, Minecraft could have run just fine in Java.
>>
>>54316896
>do you even know what a garbage collector is?
do you? do you have even have the slightest idea how the modern JVM GC works? java is slightly slower than C++ because of run-time type identification, not because of garbage collection. even much slower ancient Java versions from the 90s matched the performance of C++ with RTTI enabled
http://www.javaworld.com/article/2076593/performance-tests-show-java-as-fast-as-c--.html?page=2
>>
>>54316914
D'oh!

I agree with you but it just occured to me that they may have done this in an attempt to decrease the possible risk to their product, as executable code could've been saved to any random server and executed on any recipient's computer from there.

And at the same time they would be decreasing risk to the customer base by simply cutting down on access levels. There is still malware in apps that users download so not all access was curbed. But at least when something does go wrong, it wasn't an inherent quality in java not existant in other languages. By then it would be the fault of the repository/customer and the responsibility of the repository/customer/law enforcement.

Can someone correct me on this? It sounds right to me and I'm really doing my best to stay neutral in the matter because I like java but I like other languages too.
>>
>>54317019
>attempt to decrease the possible risk to their product
So, in having so common a degenerate infrastructure they'd be victim to a far greater range of opportunists looking to exploit vulnerabilities which in turn might make for more vulnerabilities.
>>
>>54314098

When 'they' use python its a script sitting on top of a shit load of fully compiled C and its not slow.
>>
>>54316930
>There is exist wrapper classes for integers and floats
it does not have anything to do with anything, because it still has primitives. did you even read the definition of OOP he posted?
>>
>>54316991
so why haven't game developers jumped to using Java since it's just as fast? why are they wasting their time with low level shit when they could just use Java

why does the average Java program (not just extremely simple benchmarks) run 10x slower than an average C++ written program?
>>
>>54317080
Existing infrastructure and documentation you goonie. C++ is objectively shit anyway. No one should use be using it but people thought it was a good idea two decades ago and here we are, stuck with an ever increasing snowball of shit. But we're not cavemen anymore, we can tell when something is shit.
>>
>>54317080
>so why haven't game developers jumped to using Java since it's just as fast?
Because the good, publicly available engines are C++.
Lower-level languages give more control over memory (when done correctly).
Better interfacing with hardware (particularly graphics cards).

People need to stop treating languages like identity politics.
Languages are tools and each has its intended purpose. You don't use a screwdriver to hammer a nail, and you don't use a hammer to paint a wall.
>>
>>54315536
>no real arguments
>>
>>54317080
>so why haven't game developers jumped to using Java since it's just as fast? why are they wasting their time with low level shit when they could just use Java
most game devs know C++ and most tools require it, because it's been a meme in the game industry since the 80s
>why does the average Java program (not just extremely simple benchmarks) run 10x slower than an average C++ written program?
it doesn't
>>
>>54316866
>benchmarks don't matter because they don't agree with my feelings
>>
>>54317209
why are all java programs coded badly? that could be the only explanation why they're all so much slower
>>
>>54317062
And you really believe the wrapper classes in Python aren't implemented using primitives? Why would a language without type safety ever need to present that information as "primitive" data?

And no, I didn't read what he posted. I've been on /g/ discussing this bullshit for like...4 years now. If /g/ were a subject of study, I'd have 3 doctorates by now.
>>
>>54317229
>If /g/ were a subject of study, I'd have 3 doctorates by now.

>tfw PhD in Shitposting
>>
>>54317227
>all java programs are slow because I say so
>>
>>54316540
LibGDX, JMonkeyEngine and Slick2d are some that come to mind
>>
memes
>>
>>54317250
But you haven't explained why it would bother presenting primitives if you never treat the information with that distinction?

btfo
>>
>>54317229
>And you really believe the wrapper classes in Python aren't implemented using primitives?
implementation details are irrelevant when talking about language constructs. this way we couldn't even say most languages have loops. only goto statements
>>
>>54317313
>But you haven't explained why it would bother presenting primitives if you never treat the information with that distinction?
what are you even talking about? are you saying Java doesn't recognize primitives?
>>
>>54317327
I'm saying that the distinction you made between java wrappers and python wrappers is a semantic one based mainly on how the languages are TAUGHT. They are both making the same native function calls, one just lets you program the machine using lateral function calls and the other allows you the convenience of an interface with the ability assemble itself out of the separate components available to one in a computer. If you recognize Integer as being different from integer, but don't recognize Integer in java and Integer in python as functioning on the SAME LEVEL of the computation process you are simply nagging at your own ignorance. And doing so outloud.
>>
>>54314098
https://www.youtube.com/watch?v=oj9V8VAmwOc
>>
>>54314098
>Why do people bitch about Java being slow
Because they don't know java and need to justify it somehow.
>>
>>54317466
>I'm saying that the distinction you made between java wrappers and python wrappers is a semantic one based mainly on how the languages are TAUGHT.
it simply not true. do you even know what static and dynamic typing is?
>They are both making the same native function calls
they don't
> one just lets you program the machine using lateral function calls and the other allows you the convenience of an interface with the ability assemble itself out of the separate components available to one in a computer.
one is literally a wrapper class implemented in java and a part of the library
>If you recognize Integer as being different from integer, but don't recognize Integer in java and Integer in python as functioning on the SAME LEVEL of the computation process you are simply nagging at your own ignorance.
they don't function on the same level of the computation process and it has completely no relation to Java's Integer and int being different
I have no idea what you are trying to say. you just spouted some completely wrong bullshit with not even a remote relation to Java primitives
>>
>>54317466
Python's Integer implementation:
http://www.laurentluce.com/posts/python-integer-objects-implementation/
Java's Integer source code:
http://www.docjar.com/html/api/java/lang/Integer.java.html
>>
>>54314389
we are javafx now

>>54316626
Java and other garbage collected languages aren't great for games, because those garbage collectors steal frames when they kick in. Usually you wouldn't notice this, but with time critical application like games, this can lead to spontaneous lags. A way to conquer this, is to use object pools. But to me this concept is kinda stupid. I don't wanna instantiate a billion objects at the start of an fps server, so that no ballistic bullets need to be garbage collected during a match. Btw. this is a major problem with the Unity engine as well, but most developers are completely ignoring it.

>>54317227
With a good Java program you won't even notice that it's been written in java. You can ship it as an .exe and you don't need to install the jvm on your os.

Btw. Java is mostly used on server side and business applications. Some of them are great and some are shit. But Java is in the business world a bit like what c++ is in the game industry. It's not used because it's such a great language. It's mostly used because of the tooling, frameworks and the know-how of the developers.
>>
what's with all those Java threads lately? just a few years ago every Java thread died quickly with no replies. did /g/ finally decide to get jobs?
>>
File: 1456428206925.jpg (67 KB, 500x600) Image search: [Google]
1456428206925.jpg
67 KB, 500x600
>>
>>54317976
>C
>minimalism
the only thing that's minimal in C is the number of features, like no native multithreading support
>>
>>54314098
Personally, I only bitch about Java because there's no real excuse to use it when C# exists. Could give a fuck about Python.
>>
>>54317080
because features like direct control over memory can be turned into optimizations for things like game engines.
>>
>>54317996
>What is C11
>>
>>54318256
something that most compilers probably won't support in 20 years?
>>
Serious question:

Why doesn't Java let you manually free shit up once you're done with it?
>>
>>54315290
> I am such a bad programmer I need all that type safety bloat.
>>
>>54314234
Noob question, just finished calc1 and was wondering what calc1 has to do with python.
>>
>>54317996
that's because efficient threading is not platform independent.
use a library that suits your use case, friend
>>
File: free shrugs.jpg (48 KB, 449x642) Image search: [Google]
free shrugs.jpg
48 KB, 449x642
Performance-wise Java is good for what it is and virtual machine languages like Java have their place.

What I hate about Java is mostly writing and developing with it. Everything needs to be wrapped in a class, even global functions and variables as static members if nothing else. Error handling is annoying because you are forced to handle every possible case. even if you don't want to. And stupid shit like not allowing multiple inheritance (well more than 2 or was it 3 classes) - you feel like the programming language is attempting to hold your hand. Oh, and you're pretty much forced to use an IDE, at least if working with external libraries.

Python isn't really comparable as an interpreted language, but Python is also good for what it does and its pleasant to write, too.
>>
>>54314122
>what is -Xmx
>>
>>54318466
Funny, I like Java because of what you describe.

>Everything needs to be wrapped in a class, even global functions and variables as static members if nothing else.
That also forces proper namespacing.

>Error handling is annoying because you are forced to handle every possible case.
Which is good, it encourages actually handling errors and brings possible exceptions to the attention of the programmer, rather than the programmer not being aware of certain exceptions being possibly thrown and the user getting an obscure CryptographyException where nobody would've bothered to look.

>And stupid shit like not allowing multiple inheritance (well more than 2 or was it 3 classes) - you feel like the programming language is attempting to hold your hand.
It used not to allow multiple inheritance at all and I disagree with interface default methods. You do not want to have to check more than one base class to find out what method would possibly be invoked.

>Oh, and you're pretty much forced to use an IDE, at least if working with external libraries.
Java is, fortunately, very verbose. With that verbosity, unfortunately, comes a lot of typing and import management. In the name of clarity in the language design, an IDE is effectively a requirement, yes, but that is but a necessary evil. Nor that this is much better with C#.
>>
>>54314098
java is slow to write and slow to run

python is fast to write and slightly slower to run

every lower level language is slightly slower to write (than java) and much faster

java is the worst of both worlds, just accept it.
>>
I write in java as a hobby, to make small programs and apps (never more than 1000 lines of code)
I like java because i can develop for windows, linux and android
Would you recommend a different language?
Nothing too serious, just to have some fun on weekends
>>
>>54318682
Java is quite a bit faster than Python though.
>>
>>54318689
naw, other languages can do the same thing, but you're using the right tool for the job here.
>>
>>54318689
C# is becoming when targeting Linux and Windows alone because of the .NET Core platform. Note that you get no GUI toolkit on Linux, so C#/.NET Core is only an option for command-line applications.
>>
>>54318701
>quite a bit

maybe if you're comparing well optimized java code to normal python code, or normal java to pajeet-tier python

If both are similarly well written, they'll preform similarly, java should only lead by a bit.
>>
>>54318709
nigga what? there are gui toolkits outside the standard library. also ever heard of mono? you can target more than just windows/linux
>>
>>54318709
I see. How much is c# tied to Microsoft? I mean , can i run c# code in a 100% open source environment?
I think that's what the mono runtime does under linux.
I'm trying to avoid nonfree software as much as possible, to avoid possible problems with licenses
>>
>>54318794
>outside the standard library
Yep, people want to install more shit with their package managers for one app!

>mono
1. Dog-ass slow memory hog.
2. You need to take very very special care and keep testing behavior in mono because it just never correctly maps down to the Microsoft counterpart. Sometimes you'll even hit issues with the most basic of things (Mono + PulseAudio = random mono crashes on-sound)
>>
File: 1414434119065.jpg (7 KB, 355x397) Image search: [Google]
1414434119065.jpg
7 KB, 355x397
ITT: nobody knows how to program outside of their comfort language.

C is gr8, if you know what you're doing.
Java is gr8 if you don't.

Bitches don't know bout libraries
>>
because poo in loo
>>
File: 1277707153371.png (68 KB, 281x313) Image search: [Google]
1277707153371.png
68 KB, 281x313
>>54318835
>people want to install more shit with their package managers for one app!

You know nobody ships source code for their programs right?
>>
>>54318816
>I see. How much is c# tied to Microsoft? I mean , can i run c# code in a 100% open source environment?
.NET Core has not yet left beta, but it's ever-improving. .NET Core is, top-to-bottom, including VS Code, available as FLOSS (usually MIT) with a patent promise. It targets FreeBSD, Linux, Windows and Mac OS X.

Mono is shit. If you need to venture into territory not covered by .NET Core, stick to Java.
>>
>>54318858
Name one cross-platform C# GUI lib that works on Windows as well as Linux given a few bundled dlls with the output executable and an installation of mono.
>>
>>54318682
confirmed for not having the slightest idea about programming languages. the difference in speed between Java and Python is much much bigger than the difference between Java and lower level languages. Java is almost as fast to write than Python, especially using the IDE features, and it makes it up in future maintenance, thanks to the static typing
>>54318717
>If both are similarly well written, they'll preform similarly, java should only lead by a bit.
bullshit
>>
File: 1293503415146.gif (2 MB, 285x214) Image search: [Google]
1293503415146.gif
2 MB, 285x214
>>54318885
>GUI lib
>>
>>54318816
mono and .net core are MIT licensed so you're good either way

>>54318835
>>54318870
kek, either way it's still better than java. i'll take a slightly subpar runtime for a significantly better language any day. honestly never had a problem with it, and i've been using c# for some 8 years, though mono only for a few. but then again if i'm serious about something i use c++
>>
>>54318890
>Java is almost as fast to write than Python
lmao
>and it makes it up in future maintenance, thanks to the static typing
lmao

this whole static typing > dynamic typing thing is a meme. Having done both professionally, static typing is only important when you're working at memory level, i.e. languages like C, but definitely not Java
>>
>>54318885
winforms 2.0
>>
>>54319054
I said "works", not "clipboard is fucked, font rendering and element spacing is fucked"
>>
>>54318960
>lmao
nice argument. I'm sure saving a few LOC for 20 times worse performance is a great idea.
>this whole static typing > dynamic typing thing is a meme. Having done both professionally, static typing is only important when you're working at memory level
you clearly haven't maintained a large codebase. enjoy your unreadable programs and hard to find bugs
>>
>>54314258
java gui's are actually the worse thing in this world
>>
>>54319077
gtk#
>>
>>54314410
Come back when you've taken your first real math course
>>
>>54314122
Niggas that use python eat bananas in one bite.

>>54314234
Python users wear strawhats to the club. They are the definition of fucking hillbillies.

>>54315043
Python users kiss the tip of their hotdog before eating it.

>>54315325
Did this fag actually say Java is dying? Nigga python has been dead. They cant even decide which version they want to use. Niggas that use pythons pull up to the club on a horse and carriage.
>>
File: laughing dog.jpg (54 KB, 450x337) Image search: [Google]
laughing dog.jpg
54 KB, 450x337
>>54319120
>>
>>54318337

Nothing, but Python hate is a good noob indicator.
>>
>>54319136
If some held a gun to my head and said
"Name one useful Python command or Imma cap you nigga!"
>RIP
>>
>>54317149
Clearly you haven't done anything in OpenGL. If you are doing graphics programming C++ is way to go.
>>
>>54319183
i wouldn't worry about it, he's gotta be shitposting. anybody who says java is as fast as c++ is
>>
>>54314098

> programmers are all one person
>>
File: 1454053427572.jpg (48 KB, 330x319) Image search: [Google]
1454053427572.jpg
48 KB, 330x319
>>54319114
like what?
>>
>>54319211
nobody says it's as fast as c++, only that the speed difference is almost negligible
>>
>>54314122
Python uses more memory though.
>>
>>54314098
Python is really useful because you can accomplish a lot in a small amount of code, which helps to make up for its comparative slowness.
Java, on the other hand, is basically like an uglier version of C++, and requires more code than C++ to accomplish the same thing, while also being slower.
Java being slower isn't why people dislike Java, really.
>>
>>54319483
>Java requires more code than C++ to accomplish the same thing
my sides. post some examples
>>
>>54316893
tell that my professor still using applets.
>>
Fully-optimized Java code is usually slower than fully-optimized C code. The degree of degradation, based on my experience, is probably a good 10-50% slower for most tasks. That's actually not bad; I've seen much larger gains than that from a single optimization pass.

Memory is another matter entirely; Java's memory management is basically designed, from the ground up, to support huge distributed codebases. This means it front-loads runtime load, is greedy for memory, and has stop-the-world GC passes. If you need anything approaching a real-time operating system, Java is one of the WORST languages you could pick.

If you're writing a generic program for which performance isn't critical (yes, even some games qualify), then Java is perfectly fine.

If you're writing a program with not too big of a scope, and are stuck with limited resources or restrictive performance requirements (say, a fighting game, bare-metal interface, or embedded application), it's not much of a choice; you have to pick something else (preferably C), or you'll fail.
>>
>>54319512
>If you're writing a program with not too big of a scope, and are stuck with limited resources or restrictive performance requirements (say, a fighting game, bare-metal interface, or embedded application), it's not much of a choice; you have to pick something else (preferably C), or you'll fail.
embedded java is doing fine though
>>
>>54319528
Embedded C is doing way better than even that.
>>
>>54315108
using more memory == slower execution time.
because of java's retarded, bloated object model, it leads to inefficient cache usage. that will kill performance even if the machine code generated is optimal.
>>
>>54319499
I haven't programmed any Java in a long time, but it seemed to require a lot of horrible boilerplate - always catching exceptions for simple operations, creating all kinds of stub classes to serve as error handlers, and generally being a huge ugly OOP mess.
>>
>>54319409
only in certain specific cases does it even qualify as "almost" negligible, and those are cases where any jit runtime worth its salt should be able to compare. any real application will show a much larger difference in performance
>>
>>54319632
Are you this guy? >>54319628
>>
>>54319655
no. haven't been posting in any other threads
>>
>>54319632
it's the other way around. C++ only shows a visible performance benefit in some very complex computations, but it want matter in a regular application
>>
Ir you're a good programmer the language does not matter. I'm a senior developer and I0m working with Java for the fist time and while i have no idea how Java works I'm leading a team. Yeah.
>>
>>54314098
java is slow compared to c or c++
python is just as fast as java if you use a jit compiler, and has a much nicer syntax than java
the only point of using java is that it has an excellent standard library
>>
>>54319710
top fuckin kek m8. "computations" is where they can be similar because it's easy to optimize local, primitive operations, which is why they perform similarly in many benchmarks. java's drag comes from overabstraction, excessive (mandatory, actually) virtualization, garbage collection, and cache inefficiency, literally none of which a well-written c++ application have to worry about
>>
>>54319718
xD read about it a bit... Its stupider then other languages, i mean Java ... My personal opinion I Hate Java... Try using Qt... Much better + c++ code + multiplatform + asynchronous events are much esier to handle + passing ref. to function not the hole object + GOD LIKE help and Documentation :)
>>
>>54314122
Yup and that too
>>54319922
>>54319718
>>
>>54319718
Hello vikram
>>
>>54319975
--vikram
Nice
>>
>>54319922
i hope this is a shitpost
i'm no fan of java either but you should have your facts straight. it passes objects (except primitives) by reference, not by copy
>>
>>54320024
Nope... Try it... The shit is like lisp... Try to change object in function, you wont see the change outside... Btw read about it, shit is shit... You know you made me check, and even on stackoverflow they call those who think Java is pass by ref. newbies... xD
>>
>>54320024
Try Qt... Its good for everything and if you are on Linux you wont have any problem ;)
>>
>>54320024
>>54320226
Isn't it a copy of base object and all it's primitive type fields and reference of subobjects? I think C# works the same way but C# also has ref keyword if you want to pass reference.
>>
>>54320272
In Java it copies the whole Object. In C# i heard there is a keyword for pass by ref. but i dont use C# that much....
>>
>>54314098
Yeah, because when I want to write a small piece of code I want nothing more than deal with the Java's shit.

Java is a good language, but it's meant for bigger corporate projects. You wouldn't write a weekend project in Java or use Java for fun.
>>
>>54320397
Kek... Please stop...
>>
>Python
>A language that they teach to five year olds.
>>
>>54314098
Those two aren't really comparable. A better question is why do people favour Python over Ruby when the latter is better pretty much objectively
>>
>>54321142
Btw How is Ruby? :) I never used it... :( wanted to but didnt have time...
>>
>>54321271
It's Python with more flexible syntax and none of the mandatory indentation cancer
>>
>>54321278
XD
>>
>>54314098
Because java being shit is a meme.
>>
>>54315011
Java was design for Pahjeets.
>>
File: 1461024237041.png (170 KB, 930x436) Image search: [Google]
1461024237041.png
170 KB, 930x436
>>54319789
>overabstraction
not part of the language. ib4 main function in a class
>excessive (mandatory, actually) virtualization, garbage collection, and cache inefficiency
are you from the 90s? none of those things are a problem anymore, except maybe slightly bigger memory usage and you forget about JIT optimizations that are especially noticeable in big applications. JVM garbage collections actually performs better than poor man's garbage collection constructs in C++, like shared pointer.
>>
>>54314098
>Why do people bitch about Java being slow when Python is slower, and they favour Python over Java?
I use Python because it's convenient, not because it's fast.

I use C when I gotta go fast.
>>
>>54320333
>In Java it copies the whole Object.
are you retarded?
>>
>>54319400
Real Analysis, Topology, Abstract Algebra
>>
>>54319763
>java is slow compared to c or c++
no, it's not. the difference is barely noticeable
>python is just as fast as java if you use a jit compiler
not true. it's still much slower
>>
>>54318499
>what is Xmx
Xmx is the setting that is
- not respected everytime
- the point that ensures the collapse, providing great opportunity to analyze super-huge heap dumps
>>
>>54320024
Java isn't pass by reference, it's pass by value.

Object object = new Object();


is analogous to the following c++:
Object *object = new Object();


Then, if you have some method:
public class Foo {
public static void changeObject(Object a) {
a.setProperty("foo");
}
}

The object will be modified, but only because Object a is REALLY a pointer.

>>54320333
No, this is wrong.

>>54316537
The JIT is able to make optimizations and move
objects as needed. Cache misses aren't as common as you think.

>>54320226
You're wrong. Java objects are not immutable.
http://ideone.com/GabZZ9

ITT: a bunch of shitposting. My suspicions have been confirmed: everyone on /g/ who hates on Java doesn't know it.

(For the record Java the language sucks -- Clojure FTW).
>>
File: 1456450802536.gif (94 KB, 514x510) Image search: [Google]
1456450802536.gif
94 KB, 514x510
>>54324195
>>54320024

Java is technically pass by value, but passing a reference (pointer) by value is still passing by reference. The only thing Java can't do is passing a reference by reference.
>>
>>54324365
>passing a reference (pointer) by value is still passing by reference
no, it's not, because you can't assign a different value to the variable passed to the function. do you even know what passing by reference is?
>>
File: fizzbuzz.jpg (174 KB, 854x853) Image search: [Google]
fizzbuzz.jpg
174 KB, 854x853
>>54314225
Please tell us more anon, which programs did you measure, what were the times?
>>
>>54314258
>>54314389
I hate the default feel Swing uses too. There are ways to give your GUI a native look and feel though.

Regardless, fuck Swing. If you have to use one then use JavaFX. What I don't understand is why Oracle is keeping both alive. Retire Swing to legacy and just work on developing JavaFX.
>>
>>54324683
just google the benchmarks, you lazy faggot
http://blog.dhananjaynene.com/2008/07/performance-comparison-c-java-python-ruby-jython-jruby-groovy/
https://benchmarksgame.alioth.debian.org/u64q/java.html
>>
>>54315325
Oh noooo. I have to go to the Java website and install Java from there which takes all but 3 minutes.
>>
>>54320397
This is a myth. I can write anything as fast in Java as I could in Python.
>>
>>54317274
There is also the LWJGL.
>>
>>54321271
much nicer syntax and overall better language, but equally as slow as Python
>>
Python > Java in every single way
>>
>>54327161
lol, maybe in slowness
>>
>>54327183
try using java for web development gl
>>
>>54327244
web development is exactly where Java wrecks the other languages:>>54323949
>>
>>54327244
try using python

hahahhaha
>>
File: feelsgood.jpg (20 KB, 329x357) Image search: [Google]
feelsgood.jpg
20 KB, 329x357
>mfw PHP fills all my clients' needs and is easy as fuck to make semi-complex websites with

The only purpose of Java is writing soulless boilerplate code for corporations.
>>
>>54327303
>implying python isn't one of the best languages for web development
are you fucking retarded or in denial?
>>
>>54327293
>servers
this is not web development you stupid fuck
>>
>>54327465
developing backends is the most important part of web development, you retard
>>
>>54327303
You are definitely retarded. Python is known as being one of the better dev environments for web dev, with C#/ASP.net devs being able to do twice as much in the same time with Django. Even with Java's Spring's aspect-oriented programming, you can't beat Python's expressiveness and dynamicness, and Django's strong batteries-included ecosystem
>>
>>54327362
I learned PHP this semester and it's pretty easy to get into.
But it feels weird using it considering how often people shit on it. I guess I just haven't used it enough to see the main issues.
>>
>>54327303
google uses python
what a fucking retard
>>
>>54327860
google is jew
>>
>>54327983
everyone is jew you donkey
>>
Java is not bad because it is slow.
Java is bad because it is overly verbose without having anyone gain the usual features of an object oriented language.
A good example is not having operator overloads for anything but strings.
Why?
Is it not meant to be readable?
>>
>>54327546
Django -definitely- has scaling issues. It's possible to get it to work as your project expands and demand grows, but it's usually easier to scrap and rebuild.

Django's actually kind-of old hat at this point. Rails is even old. The hot-new-thing is some sort of React framework usually.
>>
>>54328421
>Java is bad because it is overly verbose without having anyone gain the usual features of an object oriented language.
>A good example is not having operator overloads for anything but strings.
using arithmetic operators on objects isn't a OOP feature. String operators even disqualify Java from being pure OO, because all operations performed on objects in a OO language must be done through their methods
>>
>>54327860
Google is 80% Java, maybe 10% python and 10% other languages you moron.
Google's internal frameworks, Guice, GWT and Guava are all written in Java.
>>
>>54327465
These aren't only servers you faggot, most of those are frameworks too.
>>
File: 1462041906605.jpg (214 KB, 444x467) Image search: [Google]
1462041906605.jpg
214 KB, 444x467
>>54324001
>Abstract Algebra
>Hard
Pick one
>>
>>54328421
this is a retarded meme
>>
>>54330338
I didn't say that Abstract Algebra was hard. I said that it was real math.
>>
>>54330932
No that is what you implied. Your bashing calc 3 because you think its easy, your not actually saying Calc 3 isnt a real math are you? Exactly, now stfu
>>
>>54330338
Lel, "abstract algebra" is considered a hard course to you americucks.
>>
>>54328468
>Django -definitely- has scaling issues
How so?
>>
>>54316468
I imagine that has more to do with how Java programs are developed than because the language implementation cannot achieve adequate performance. AbstractClassFactoryBuilderBeanFactoryFactoryObserverEventLoopFactoryBuilders have a lot of overhead.
>>
>>54314225
I recently implemented DES encryption in Java and C, and the efficiency difference was pretty much negligible
>>
>>54316863
The fact that Java ISN'T pure OO, despite forcing you to put everything in a class, is one of its worse aspects, if not the worst thing about it.
>>
>>54314208
>the speed difference compared to C is negligible in 99.999% of real world tasks.
You mean your IT school programming exercises? If you need to program anything that has to do with graphics, compression, encryption and stuff, you can't use a scripting language.
>>
File: girls-getty_1376498i.jpg (44 KB, 446x400) Image search: [Google]
girls-getty_1376498i.jpg
44 KB, 446x400
>>54315804
>You don't need to optimize Java, it's all optimized.
>>
>>54332868
Java isn't a scripting language and the performance difference between Java and C is very low.
>>
>>54333214
If it's not compiled, then it's ran by an interpreter that reads your code. Hence, it's script.
>>
>>54333256
It's compiled to bytecode, which is subsequently compiled to machine code by the VM after a fixed number of loops which are used to optimize it. It's not a script.
>>
>>54314098
End users rarely directly interact with anything that's obviously written in Python, and thus create no negative associations. On the other hand it's very likely that the average person has used multiple UI programs written in Java, and most of those have probably been horribly written memory-hogging enterprisified garbage, creating a strong negative association.
>>
I hate that python's significant whitespace breaks emacs' smart indentation.
>>
>>54314098
Java is still far more widespread than Python.

And I don't think anyone is using Python for performance.

When they bitch about Java, it's usually one of 2 things: startup time, which is objectively slow, but does not matter in most cases, and GC, which only is an issue if you are using the wrong data structures.
>>
>>54333361
That's a very good point.
>>
someone rewrite jdownloader in c++
>>
>>54314098
Because they don't know Java
>>
>>54335985
why? to introduce memory leaks?
>>
>>54314098
>java slow
>when python is slower
>garbage collected garbage

>implying I don't use C++ for exactly these reasons
>>
>>54314719
This.

>shit-filled streets
I see what you implied there. And I like it.
>>
>>54314098
cause python is at least useful to do little scripts and stuff

java isn't as easy to use as python, and it's slower than c++

it's only good to make muh enterprise oop code full of superfluous design patterns
>>
File: 1404671920558.gif (1020 KB, 500x373) Image search: [Google]
1404671920558.gif
1020 KB, 500x373
https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
>>
>>54337543
>t's slower than c++
the speed difference is negligible and it's faster than c++ in some cases
http://blog.dhananjaynene.com/2008/07/performance-comparison-c-java-python-ruby-jython-jruby-groovy/
>>
>>54314098

Why do people ALWAYS compare apples and oranges?

Java is a programming langauge for large scale appliations. Python can be used for everything up to small websites, but in real life you use it as duct tape or to "get things done"..

It's no coincidence that Groovy was designed after Python but works within the Java ecosystem. But that's doest make Groovy replace Java.


>>54332875

Stay classy, /g/..

The JVM is pretty good in optimizing things:

>http://www.beyondjava.net/blog/a-close-look-at-javas-jit-dont-waste-your-time-on-local-optimizations/
>>
>>54337564
my sides
Thread replies: 246
Thread images: 17

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.