What's wrong with Java?

What's wrong with Java?

Other urls found in this thread:

github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
twitter.com/NSFWRedditVideo

Nothing.

Everything.

It enables ENTERPRISE CODING
In the hand of a sane person it's pretty neat, but most Java coders aren't sane.

It can't make anime real. Only C can

...

It exists

It doesn't have valuetypes and inheritance is fucking cancer (interfaces excluded) and it requires a global JVM or you have to ship it with your application.

Bloat on top of bloat for the sake of bloat.

>What's wrong with Java?
Shoddy VM implementation even from Oracle/what's left of Sun with security issues out the ass.
Lack of real planning for updates and upgrades results in ugly, and clunky bolt-ons to the syntax and libraries.
Language lacked a good GUI library for a long time.
Clunky threading.

I can sort of understand tossing things like multiple inheritance and operator overloading due to the abuse and difficulties they cause.

The language does get a lot right too. Using standardized IEEE data types for primatives solves a lot of cross platform issues that many earlier languages choke on. Having a sizeable built in library helps reduce copypasta code.

Still, would rather use C#, which is essentially MSJava.

Only the deprecated browser plugin has security issues. They're going to finally kill it with the next release.

its so fucking verbose

Verbosity, culture of best practices that can go overboard.

Oracle being the steward is very dangerous. It has been stated several times that the Ask toolbar shenanigans were the primary funding and internal justification for keeping it around for several years.

There are also the arguments against the JVM, but that can be decoupled from the arguments against the language. But in doing so, that means that "why java and not another JVM language" become pertinent questions.

I use java for our application server at work and really enjoy the language. Maven dependency management with tons of well tested libraries makes adding new stuff a matter of library jockeying.
Unit and integration testing is well supported by most IDEs and the language lends itself to making testable (but verbose) code.

The arguments against it are mostly valid.

not high level enough to be worth using, and not enough low level control to be used for what you would use C for. it's got the verbosity of C with none of the reasons C is used. its the worst kind of middle ground

It has few of the most retarded design decisions in the history of programming.

Tbh the only way java could be fixed would be rewritting the whole thing.
But what actually happens is that even more clusterfucks get added to play catch up making it a overdesigned piece of shit.

Glassfish is horrible and weblogic license is expensive. CriteriaBuilder is a terrible api. Other than that it's chill. Everyone mad just doesn't know how to write java.

"Enterprise quality practices" that its community came with.

See github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition

This mainly.

OOP was a mistake.

anyone have some good interview question on java?
im having an interview soon

>Do you know Java?

Unreadable

...

It exists.

Retards still use it.

> C# is MS Java
Nah, it's Delphi having sex with Java 1.4 really.

But as for what's wrong with Java?
I don't think that there's anything wrong with Java 8/9 from where I'm standing.
My issues are more with:

> The community around the language.
It ranges from smart intelligent people to complete fucknuggets. And the complete fucknuggets make shitty youtube videos about "how to make %s in JAVA" which perpetuates shitty practices.

> Tooling
Ranges from good, like recent Eclipse releases, to utter shit, like Eclipse ca. 2014.
You also have several toolchains to choose from, which is a blessing and a curse.

For example, you can write with at least 3 large IDEs. NetBeans, IntelliJ and Eclipse. All of them are currently good.

You have three good build systems (although you can of course use GNU Make and what have you), namely Ant + Ivy, Maven or Groovy. (You also have SBT, but that's more of a Scala thing.)

The reason this is good, is that you can introduce the idea of a build-file to students using something very simple, like Ant. Then, when they know how it works, and figure out why it's a good thing, they have the foundation to learn about continuous integration with Jenkins, etc.

On the other hand, you now have to have a working understanding of about 3 different build systems. (Although in 70% of the cases, Maven is what's going to be used.)

Then there's microframeworks, enterprise frameworks, ORM frameworks, etc.
It's nice that I can just pick a small framework and pretty much use Java as glue between the markup templates and the database if I want to, or I can go full on ENTERPRISE.

But there's a lot of mediocre people who are happy being mediocre. And they ruin everything by learning ENTERPRISE FRAMEWORK, UND ONLY ENTERPRISE FRAMEWORK, so what's supposed to be a small application that used SparkJava, Jackson and postgres' JSON datatype, turns into a giant hairy mess with IBM DB2 JSON TO XML SERIALIZER, web.xml and so on.

literally nothing

JRE

It's not always that I can't code, it's that I work with an idiot who can't, and we have to set our standards so that the idiot can contribute.

And that means no direct SQL queries, because he's too much of a faggot to learn SQL. Mandatory ORM for everything. Especially when it doesn't make sense.

It means that we have to have autowired dependencies that takes 2 days to make work properly, saving us 2 hours of manual injection, because he's too retarded to figure out how to do it properly.

It means no Streams because "TAKE ALL THE OBJECTS, DO THIS TO THEM; THEN DO THAT TO THE RESULT AND COLLECT IT TO A LIST" is too hard for him.

Java is moving closer to Common Lisp. I like that. We're getting a proper REPL in Java 9. And Jigsaw.

But there are some real warts in the language too. For example, why can't we have reification for primitive types, and erasure for object types? Makes little sense to me. Why is char the only unsigned int that we have available? And so on.
Of course the most painful bit is where not all characters fit into a char. Fuck that part in particular.

If we redid the Java language from scratch, I'd just make char an unsigned 32 bit integer value, so it could hold any unicode character, and we'd never have that problem again.
Strings internally would just be byte[], and they'd be able to convert to char as needed.

Of course, there's likely some obvious as fuck reason that's a bad idea, but I can't see it.

Not reading your long life story blog

no unsigned integers
no simd
no avx

> No unsigned integers
But that's wrong.
char is an unsigned integer.

thanks for the fucking 8 bit unsigned integer java

this is what they meant with

>Individuals and interactions over processes and tools
>Working software over comprehensive documentation

just fire the useless

It's 16 bits, but I see your point.

I don't work there anymore. My blood pressure is much better after moving.

What's wrong with the taste of curry?

news flash: interpreted languages require installation of interpreter

>What's wrong with Java?

The chicks who are into it NEVER look like OP's picture.

You, I like you.

It has a lot of high-level logic which confuses Sup Forums retards who only understand loops and conditional statements. Also, it's popular.

getVariable()
setVariable()

It mixes primitives into OOP design and has an awful get/set implementation.

AbstractFactoryPatternSingletonConstructorFactory

>high-level logic

>What's wrong with Java?

Nothing

>JVM

There is such a thing as compiled Java

>Curry

Funny... Sun was a US company, and Oracle still is.

>Larry

That's what's wrong, especially now that he's gone full-retard.

What's usually wrong is between the keyboard and chair, but the above statement is what's going to eventually kill Java for mono/C#

You wouldn't ever have a singleton factory.
If you knew what those words meant, you'd know this, and not prove completely correct.

>t. Pajeet

isn't it the best performing interpreted language?

>Strings internally would just be byte[],
Y tho. Why shouldn't they be char[]?

Java is not especially fast when run in interpreted mode

>no unsigned integers
Thank God. How many exploits and outages have signedness bugs caused over the years?

Because a char would be a 32 bit unsigned integer, designed to hold any character in one variable, unlike now where a given character needs 1-2 chars to store.

>no simd
it does do it automatically, but will not explicitly let you control when

Absolutely nothing if you're using OpenJDK.

they can't because it's legacy

You have also to compile it though.

And you want to store these 32bit values as a sequence of four bytes instead of one 32bit char?

In any case, this will not solve your problem. Codepoints and characters are not 1:1.

Some characters require multiple codepoints: country flags, negro emoji and certain accented characters use 2+ codepoints (this is not the same thing as why you need two 16bit chars today). More exotic Unicode features like ruby characters can use dozens of characters to compose one glyph.

And sometimes you can have multiple characters per codepoint, such as the "fi" ligature.

It has a lot of good premade features such as concurrent queues

Where can I learn programming languages taught by cute anime girls?

>high level logic
How so? To me all java I've seen is just your typical OOP shit. Very simple to understand but incredibly onerous to write and use.

it's not python.

So Sup Forums I've been thinking abut a simple language to help writing Java.
We all know beans right? They're classes with nothing but getters and setters.

So why write them out properly, when you could get the equivalent information in something like, say, this?

[ // Every definition begins with an open bracket
org.Sup Forums.model.PostBean // Then the fully qualified classname
// And then a list of fields.
java.time.LocalDateTime post;
String name;
String tripcode;
int postNumber;
String rawText;
// And finally we close
]

Write that, and tell the Bean Definition Language to compile it, and you'd get it with getters, setters, hashCode, equals, toString and all that jazz. It would just create the class without any hassle.

You could just keep them around in src/bdl/beans.definitions or somesuch, and it could be compiled before javac gets called.

I know that you're thinking that this looks like it's stolen straight out of Common Lisp's way of doing things, but that's a sheer coincidence. There's no way a language with parens could get anything right. No sir.

Of course this sort of thing would work well with Emacs, Vim and other programs that integrates your development tools into an integrated development environment, but not so much for IDEs.

Fuck, you're right.

so how viable of an alternative is clojure in comparison?

It doesn't require value types. Modern JVMs can unbox values at runtime. What Java needs is densely stored data structures. Basically you have your Complex number type which is just two floats and then you implement an interface for serializing your complex number to a byte array that a data storage class use to pack complex numbers into a dense format.

> Strong typing
> Compiled
> Piece of shit Garbage collection
> Swing UI

Its just 90s enterprise trash written for and by M$ suits.

Node+React (Native) fit any usecases you might have for Java and do so much more eligantly

>Strong typing
And this is bad how?

>Compiled
HIGHLY QUESTIONABLE

>Piece of shit Garbage collection
ok

>Swing UI
You can use JavaFX

it's so abstract that it's beyond cosmos

the kids in africa make a living off it

I'm not that familiar with Java but shouldn't this
X_[0] = (double) (110639 / m);
be this?
X_[0] = (double)110639 / m;
or this?
X_[0] = 110639 / (double)m;