[ home / rules / faq ] [ overboard / sfw / alt ] [ leftypol / siberia / edu / hobby / tech / games / anime / music / draw / AKM ] [ meta / roulette ] [ cytube / wiki / git ] [ GET / ref / marx / booru / zine ]

/tech/ - Technology

"Technology reveals the active relation of man to nature" - Karl Marx
Name
Options
Subject
Comment
Flag
File
Embed
Password (For file deletion.)

Join our Matrix Chat <=> IRC: #leftypol on Rizon


File: 1668447141198.png (3.45 KB, 267x189, download.png)

 No.17618

>Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let programmers write once, run anywhere (WORA), meaning that compiled Java code can run on all platforms that support Java without the need to recompile. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of the underlying computer architecture. The syntax of Java is similar to C and C++, but has fewer low-level facilities than either of them. The Java runtime provides dynamic capabilities (such as reflection and runtime code modification) that are typically not available in traditional compiled languages. As of 2019, Java was one of the most popular programming languages in use according to GitHub, particularly for client–server web applications, with a reported 9 million developers.

<Oracle offers its own HotSpot Java Virtual Machine, however the official reference implementation is the OpenJDK JVM which is free open-source software and used by most developers and is the default JVM for almost all Linux distributions.


Java has all the features of any OOP lang with functional additions as well, multiple libraries for every conceivable use case, is an A-tier general purpose language, runs fairly quickly (as fast or half as fast as C/C++ in most cases), tons of people know it or learn it in university, or in their corporate jobs. Other languages like Kotlin, Scala, and Clojure, as well as Ruby/Python implementations, and many more are built on the rock solid engineering of the JVM.

Most of silicon valley and top corporations use Java to some extent as well. It has a solid open source implementation (OpenJDK) which is the standard. It's easy to learn, simple enough for midwit programmers to collaborate and make maintainable, portable, performant software that fulfills a practical purpose or need. It's the workhorse of programming languages.

Why then does Java get so much hate in the FLOSS community? Do people just hate OOP? Is it because of Oracle's nasty reputation? Is it because of the old school, GOF-design patternified J2EE apps thats used to be made (and are still maintained)? Most modern java can be written with minimal XML (esp. with modern spring boot).

Or is it simply because Java is perceived as boring, corporate, and associated with people's day jobs?

Can anyone give a single, rational reason NOT to use Java on a project when it "just works" as opposed to writing something in Lisp/XYZmonad/etc.

 No.17622

>Why then does Java get so much hate in the FLOSS community?
Does it?

 No.17625

>>17622
Not really. OP was probably thinking about /g/ but I wouldn't consider them part of "the FLOSS community".

 No.17631

> Why then does Java get so much hate in the FLOSS community?
JVM is heavyweight and memory-hungry.

 No.17632

>>17631
It can run on smart cards, I'm sure your desktop has comparable resource constraints.

 No.17633

>>17631
compared to what though

 No.17634

>>17633
Compared to C, this is why emulators written in Java are all emulating very low end machines and you don't see Java emulators for stuff like emulating the Amiga or Sega's 32bit arcade boards.

 No.17635

>There's nothing like the smell of fresh-brewed code in the morning. Java, a powerful and robust language, can seem a bit daunting at first, but is preferred by many for its ability to work on any computer, regardless of architecture.
>Java is used to develop LibreOffice and OpenOffice.org, two powerful and feature-rich office productivity suites. Thanks to the release of Java under the GNU GPL, people are now able to create free programs using this language.
https://www.fsf.org/working-together/gang/java

I personally dislike Java, but the JVM is great.
Kotlin is nice, unfortunately it is an IDEA project, heavily integrated to Intellij, which I use for free but it is still not great.

Scala is great. It is the best widely used close-to-functional programming language you can get. As long as you use a good IO library, you're golden, and Scalaz, Cats-effect, Monix, and Zio are all 100% solid.

 No.17642

>>17618
I don't like writing java because it has tons of boilerplate you need, though I did have a job where I wrote Java and learned about a few libraries that made things a bit better, like Lombok, Google Guava, and Apache Commons. Also streams were pretty cool, though I wish we could have used something more than just Java 8/11 when I worked there. Spring also has quite a bit of boilerplate but it works well.

 No.17643

>>17618
>Do people just hate OOP
Java's execution of OOP has several flaws. Data types are borrowed from C and the essentially static typing is very tedious.
<Now just to mention a couple of things about Java: it really doesn’t have a full meta-system. It has always had the problem—for a variety of reasons—of having two regimes, not one regime. It has things that aren’t objects, and it has things that it calls objects. It has real difficulty in being dynamic. It has a garbage collector. So what? Those have been around for a long time. But it’s not that great at adding to itself.
<
<For many years, the development kits for Java were done in C++. That is a telling thing.
https://queue.acm.org/detail.cfm?id=1039523

>minimal XML

kek

>>17632
No, there is a reason Dalvik/ART exists. Oracle derived JVMs are notoriously resource hungry.

Another major point to the detriment of Java is, that in 2017 gcj, the last independent free software implementation, was discontinued. Apart from Android Runtime there is no notable Java runtime not derived from the Oracle codebase and the only distributors of OpenJDK are Oracle, Microsoft, Tencent, SAP, Perforce Software Inc, JetBrains, Red Hat and the Eclipse foundation with Microsoft and Oraacle as major participants. The maintenance and development of Java is solely in the hands of the corporations, amounting to vendor lock in.

 No.17646

>>17634
everything is slow compared to C though. Java is only 2x speed of C, that doesn't stop the FLOSS community from loving python which is 10x-20x slower than C/C++

 No.17647

>>17643
>in the hands of the corporations, amounting to vendor lock in.
thats not what "vendor lock in" is, a foundation sponsored by corpos isn't as bad as proprietary ownership of one corpo. Tons of linux distros (RHEL + clones, Ubuntu, Suse/opensuse) are owned by corpos and those make up the majority of distros anyway. Redefining TRU(tm) open source as made by hobbyists and not foundations is wrong.

 No.17648

>>17643
They exist due to licensing.

 No.17649

It's hilarious how people who claim to be software "engineers" will disregard all evidence proving how fast and efficient Java is and will keep claiming that it is a resource hog just because they had bad experiences with Eclipse.

 No.17654

>>17646
God, python and ruby have their use, but I really dislike command line programs that you can feel run slow. I remember playing around with vagrant and homebrew, and it's such a joke that running –version feels so slow.

 No.17655

>>17647
>Tons of linux distros (RHEL + clones, Ubuntu, Suse/opensuse) are owned by corpos and those make up the majority of distros anyway
This is one of the causes behind the adoption of systemd and other freedesktop sponsored abominations. Notice RH is also involved in Java development.
But there is no reason to focus on the particular corporations, because this is only a symptom of the huge amount of labor required to maintain OpenJDK.

>Redefining TRU(tm) open source as made by hobbyists and not foundations is wrong

You wouldn't want to live of the scraps Microsoft publishes on their Github. These corpos publish their code because some people fix their bugs for free. They retain authority over their project and no personal or community-driven effort would have any hope of forking their codebases, that consist of decades of cruft. You may observe the Palemoon fork of Firefox, to see how code complexity or simply inane standards can consign open-source software to the realm of large organizations with many developers at hand. In the case of Oracle this is unanimously bad.

>>17648
The licensing incident is a good example of how Oracle still tries to preserve their ownership of Java.
IIRC the memory access pattern of the Oracle JVM makes it perform particularly slow on ARM (relevant papers are paywalled), hence the Dalvik VM uses registers instead of a stack-based architecture.

 No.17656

>>17649
I still have bad experiences with IntelliJ indexing and the like and having to tune GC just for editing. Java is fast, if you tune it right and let it warm up, but it still has to start the JVM and warm up.

 No.17660

alot of the slowness of java is really just spring being shit and overuse of reflection. Other nu-java ee frameworks like microprofile, micronaut and quarkus are supposed to be better.


Unique IPs: 11

[Return][Go to top] [Catalog] | [Home][Post a Reply]
Delete Post [ ]
[ home / rules / faq ] [ overboard / sfw / alt ] [ leftypol / siberia / edu / hobby / tech / games / anime / music / draw / AKM ] [ meta / roulette ] [ cytube / wiki / git ] [ GET / ref / marx / booru / zine ]