Java is without a doubt the best programming language. Not only does it have a ton of features, but it also supports and encourages private ownership of resources, so you will learn a lot about economics from learning java.
Why don't you use java, anons?
1 line of Lisp is worth 100 lines of java
>t. copium
based lisper vs virgin coorporate payeet
Java is not "pajeet" language morons. Also this "pajeet" who use java are way better coder that you ever will. Cope
GOOD MORNING SIR
DO THE NEEDFUL
1 java class is worth 1000 *~~))'s
Gotem
Lisp literally has superior OOP capabilities. I will take the parentheses over your lack of native support for features actual OOP languages (Smalltalk and CLOS) had for years and the million { [];}s needed to implement a quarter of them.
Okay, Bruce.
Java is one of the worst language designed for morons, JavaScript on the other hand is a supreme language, almost all the applications will be written in JavaScript, the recent bun runtime will accelerate the process, it is a multi paradigm and the language is so popular that even one of it's many framework has 1000's of jobs listed, it just literally BTFO's Java gays, python gays.
>JavaScript on the other hand is a supreme language
Yes, all apps should be designed in electron.
Even OSes should be designed in electron.
Anyone who wants ~~*speed*~~ is a homosexual
EXTREMELY low effort bait
So what
Gentlemen.
Is is is is is
Ja indeed
good morning sir
I hate Java because I hate the people that use Java. They're a cargo cult that don't know why they do what they do.
>private fields and public getters and setters are good because it just is
I hate them because they don't know their own language. I've seen "good" Java programmers have no idea what static methods are, and create a utils class that has to be instantiated to use methods that don't require instance variables.
I hate them because they think that splitting a tiny program into 20+ files is code organization.
I hate that Java's "write it once, run it anywhere" is completely false, because it's really "anywhere with an installed JVM with a version compatible with the Java compiler you used."
But mostly, I hate Java because it's the first programming language that many learn. Because it's the first, it's the preferred language of people who are too lazy and/or moronic to learn a second language. "I can do anything in Java" they say, not realizing that that doesn't mean they should do everything in Java. Need to write it quickly? Use Python. Need to be autistic about safety? Use Rust. Need to make it easy for anyone to contribute? Use JavaScript or Typescript, which, whether you like it or not, is the lingua franca among programmers these days. Need concurrency? Use Go.
Need to outsource your project to third-worlders who will post their entire job in a stackoverflow question to have another third-worlder do their work for them? Ok, use Java.
fields and public getters and setters are good because it just is
new to programming, can anyone actually explain whats the purpose of this?
Muhhh enterprise
It promotes the concept of ownership into the code
>whats the purpose of this?
Java programmers will tell themselves that this is """good practice""" and will help maintainability in case they want to extend the functionality of the getters/setters and make them do dumb shit they're not supposed to do
Guy you responded to, in my opinion
the biggest gain is that if you start with getters and setters you're less likely to make a breaking change. That's because you're not switching to getters and setters later since you started out that way, and it's less likely that a change to the fields of a class will be a breaking change since your users would only be using methods. But literally no Java programmer knows that, they just do it because they're told to.
Encapsulation.
The idea is that classes should define an interface and all interaction should happen through that interface. The core idea is that objects are responsible for keeping their own state consistent. Outside code shouldn't be able to mess up your state.
This is important because it means you can make changes in a class, and not need to worry about changing other code that uses your class, as long as you aren't changing your interface/method signatures.
Getters and setters prevent spaghetti while promoting other varieties of pasta. It is such an ugly language. If you find yourself going down the path to becoming a Java programmer, get your shit together and get out of the rut while you still can. There is hope for you.
what's a better option? C#, JS? i need something that also gets me good money, im already doing meme stuff on the side
>I hate <lang> because I hate the people that use <lang>. They're a cargo cult that don't know why they do what they do.
Because I am not a israelite and dont need an economics class
You are joking but that is sadly the attitude of many people nowadays, which is why everyone chants "TaX tHE RicH"
Man we israelites invented Java as a joke in the 1990s and the goy is still falling for it lmao
classes and interfaces were a mistake and making them first class in your language is probably the biggest on you can make. Java is perfect for people who cannot learn anything marginally more complex (even C# outclasses it) but still want to work on most aspects of a codebase, you get a lot of garbage code written in even worse frameworks like spring boot and mockito
Interfaces are fine. Virtually every language supports something similar. And when you don't have even the basic classes or interfaces at all, you end up with C.
While a good thing for a kernel, a look at the source code of microsoft's notepad will tell you everything you need to know about C's verbosity
Compared to Rust's Traits or Haskell's Typeclasses they are extremely rigid, add unnecessary complexity and restrict options in development. I much rather have a means of appending features to any type at any time rather than having to decide what interfaces are going implemented only when implementing a class. Also Rust traits make things like generics much more pleasant to work with and filter through especially since there is no type erasure, and where clauses are much more ergonomic to work with.
Ok yeah traitsare fine as well, but there has to be some way of polymorphism and as many ways as possible to reduce your code. Rust macros are one thing that is really awesome for this
traits are also directly for polymorphism along with generics, and can take on a static dispatch approach or a dynamic dispatch approach with dyn traits. Macros don't really have much to do with this as they're essentially a means to substitute values into a rust expression, which would probably use traits and generics under the hood anyway if the macro was polymorphic. Point being though that Rust's traits and generics reduce a massive amount of complexity that java code would create in comparison.
The fact that Java devs encourage organizing your project like this tells me everything I need to know.
hello-world/src/main/java/com/lab/dev/anon/helloworld/Application.java (with the actual call to printf being even deeper)
>hello-world/src/main/java/
That's the standard maven, it's common so no reason to frick with it, but if it bugs you you can change that or switch to gradle or something.
>com/lab/dev/anon/helloworld/
No reason this had to be 5 levels deep. It could've just been helloworld if you're not worried about collisions.
The JVM wasn't thought to do efficiently these kind of simple tasks, and so Java is ill suited for them, not so much for the verbosity of the projects but for the JVM's startup time compared with the inmediate startup of an interpreter. There are several languages that target JVM's bytecode nowadays, which are more viable now with the recent improvements made with newer Java releases, JRuby and Jython were third party ones, the in-house solution offered by the ecosystem was Groovy back then (which isn't actually that bad as a language but unfortunately is used very poorly) and now Kotlin, through a 3rd party module called ktscript and with official scripting support coming soon. There's also the posibility of using GraalVM to compile near native binaries for CLI applications, but that's niche.
>you will learn a lot about economics from learning java
Haven't heard that one yet, high-quality shitpost.
It's true. Using C might lead you to become economically illiterate (communist), because C promotes public variables and shared ownership of resources in the program
the frick are you even on about man
What do you not understand?
how does C promote public variables more so than java, how is java not more so about the shared ownership of resources when it uses reference counters for garbage collectors and encourages producing and sharing different objects to manage state rather than something more data driven? And how does that amount to anything more than a superficial characterization of communism?
>how does C promote public variables more so than java
Because C doesn't have private variables AND it doesn't have classes. Only structs and all members of a struct are public, like in USSR's collective farms
In C you can not access variables from another file unless you define them as extern. Essentially private variables.
But they are accessible in that file to everyone. So essentialy nationalist communism, or national socialism
ah yeah I always mix up C and C++ features, forgot C doesn't have visibility for variables.
>Because C doesn't have private variables
>what is static
dogturd ancient code with needless initializations
Music for this specific thread:
curY makes the poo burn