In Java 21 you'll be able to:void main() { System.out.println("Faggot");}andjava Main.javaHow will the "HeLlO WoRlD is So VerRboSe" fags cope?
void main() { System.out.println("Faggot");}
java Main.java
>>93660182Is this just them getting rid of top level statements like in C# 9?
What if I want to make an instance method called main that takes no arguments and returns nothing?
>>93660182honestly whats the purpose of this? who the fuck uses java as a scripting language? Im not complaining but can anyone tell me what this is supposed to solve?
>>93660492Competing with M$ for superfluous features...solutionism basically.
>>93660182>Java 21java8 is all you need
>>93660402Yea>>93660492Probably making it easier for brainlets to get into Java.
>>93660682>java8 is all you need>he doesn't want virtual threads and pattern matching
>>93660182Meanwhile every other language doesn't require writing out "System.out.println" every time you want to write something to the console, and even more obtuse stuff if you want to include some variable values in your string.
>>93660492>who the fuck uses java as a scripting language?those youtube people who sell quick java courses
>>93660718>Meanwhile every other language doesn't require writing out "System.out.println"They're changing that as well
>>93660492no one does. only extreme idiots that can't use bash for some reason because they're ultra autistic
>>93660730Good. It's about fucking time.
>>93660182I don't want a main function I want to write statements right at top levelAnd this System.out crap should not be necessary
>>93661668>I don't want a main function I want to write statements right at top levelretard
>>93660182>System.out.printlnWhat will this be replaced by?
>>93661854println
>>93661668use python retard
>>93661884it only took 30 years or so to get rid of obviously retarded shit
>>93661784no uWith Ruby, I can iterate over lines from stdin, process them, and automatically print the result to stdout like thisruby -ne '$_.upcase!' < file.txtImagine doing this with present-day Java
ruby -ne '$_.upcase!' < file.txt
That's still really fucking long desu, it's not a big deal but it's hardly a win worth bragging about. You're what, 2 decades late?
>>93660718>Meanwhile every other language doesn't require writing out "System.out.println" every time you want to write something to the consoleIf your text editor can't be configured to autocomplete 'System.out.println' when you start typing 'print' in 1995+28, you should just give up on programming and convert to an IT while people still think you're competent.>and even more obtuse stuff if you want to include some variable values in your stringIf you think printf is obtuse in 1970+53, see above.
>>93660730c has had this for how long?
>>93660718>>93661668>>93661854import static java.lang.System.out;void main() { out.println("Faggots");}
import static java.lang.System.out;void main() { out.println("Faggots");}
>>93661919>Imagine doing this with present-day JavaBut why? I literally don't need that.
>>93662065*convert to ITalso>>93661668
>>93662072C is shit. Imagine creating a lot of shit functions liketype_inittype_operationtype_freeinstead of just callingtype.operation
>>93662077no it will bevoid main() { println("faggots");}
void main() { println("faggots");}
>>93662123>>93662077Sauces?
>>93662161The >>93662077 one works since Java added static imports. I don't even know when they did it, but probably was before 2005.
>>93661912you could just static import system.outThat was always an option.https://docs.oracle.com/javase/8/docs/technotes/guides/language/static-import.html
>>93662161https://youtu.be/P9JPUbG5npI?t=301
>>93660706>he doesn't want virtual threads and pattern matchingYes.
>>93660182By having sex with biological women in a house they own.
>>93662393Why would someone have sex in the house of a biological woman?
Java fags were never gonna switch to sepples, but I guess due to Kotlin and Rust they are finally having to get their act together.
>>93660182I fucking hate this shit, hated it in C# as wellWhy make it less explicit?
isn't java just for mine craft modders and freshman cs students who go to bad schools?
>>93662877>isn't java just for mine craft moddersyeah>and freshman cs students who go to bad schools?That's haskell
>>93662877>isn't java just for mine craft modders and freshman cs students who go to bad schools?Nigger are you retarded? Almost every large platform uses Java somewhere, if not completely somewhere in its backends.
>>93660492Whats a scripting language?
>>93660697>Probably making it easier for brainlets to get into Javait's exactly this. it's adding more superfluous features nobody will actually use to the language simply to make it easier to teach retards how to get their first and only hello world, before they breakdown when they still have to learn everything else.
>>93662877>freshman cs students who go to bad schools?That's all schools.
>>93660492Who said anything about using java as a scripting language? You fucking gjgger.
>>93660182>mainYou realize “main” is just an interface to the C runtime that everything has to copy, right?
>>93660467what if you want to make a static method called main that takes an array of strings and returns nothing?
>>93660182Question. I haven't gone too deep into Java, but the more I dick around with it the less I like OOP. Is there ever a point where you guys like it?
>>93663795what do you think a scripting language is, if not the antithesis of verbosity to drive greater structured programs? yeeting away namespaces, obligatory function arguments, type decls are all pretty good indicators of a scripting language. java is only good for le meme of oop, specifically spending months writing objects and methods encapsulating members, just to drive some established framework (if not something in-house).
>>93663950what are you talking about nucodelet?
It literally did not matter. The main needed to be public and static and showed perfectly the keywords one comes by with java.Stay away from java if you are not willing to learn, noobs
>>93660182Serious question, does anyone still use this besides Jeets and legacy maintainers?
>>93660182>How will the "HeLlO WoRlD is So VerRboSe" fags cope?By picking one of the 87,000 things that are actually wrong with Java.
>>93660182I stopped caring about the verbosity long before it stopped being so verbose.What I care about is startup time. Since everyone and his dog uses Spring, it takes forever for a CRUD Hello world to launch.Until this is fixed, I can't be assed to touch Java again.
>>93660492>who the fuck uses java as a scripting language?*JavaScript joke*
>>93660182it's funny to see once again java just copying whatever c# does
>>93660718>every time you want to write something to the consoleDoesn't happen often outside toy programs, and if you really are doing command line intensive program just alias it like void print(String arg) { System.out.println(arg);}
void print(String arg) { System.out.println(arg);}
>>93669073The only thing really and unfixably wrong with Java is the default visibility. It should have been public, not package. Only restrictions to visibility should be explicit.
>>93669089>it takes forever for a CRUD Hello world to launchUhh nope... >Started SpringHelloApplication in 1.763 secondsThis with dependencies of 'org.springframework.boot:spring-boot-starter-data-jpa''org.springframework.boot:spring-boot-starter-web''org.springframework.boot:spring-boot-devtools''org.postgresql:postgresql'...and proper entity, repository and controller classes and configured database connection
>>93660735>bashYou mean python
>>93662490This
>>93660182>making the language inconsistent to make it easier to learnThey didn't think this through.
>>93669293>it's funny to see once again java just copying whatever c# doesThe absolute state of C# fags. Scala had this long before your shit lang had it. Java mostly copies from Scala, not your shitty garbage lang.
>>93670678>Scalahttps://medium.com/@yifanxing/my-experience-with-sexual-harassment-in-the-scala-community-9245b4a139de
>>93670736>C#
>>93669419You made me check.Okay, Spring Boot folks managed to turn their trainwreck of sluggish component scanning into something that works decently fast. My nodejs apps still have a shorter startup times, but at least I can be assed to try Spring Boot again.
>>93670761>Okay, Spring Boot folks managed to turn their trainwreck of sluggish component scanning into something that works decently fast. My nodejs apps still have a shorter startup times, but at least I can be assed to try Spring Boot again.Spring Boot fully supports native images now https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html#native-image.introducing-graalvm-native-images
>>93660182Console.WriteLine("Nigger");
Console.WriteLine("Nigger");
[GO]
>>93670761>Spring BootOld shit. Use Quarkus.
>>93665782I like OOP because of design patterns. It is unironically fun to figure out how to make things fit together in elegant and reusable ways.
>>93660182you could run single file programs without compiling since 17 or earlier
>>93660182>conceding to angry script kiddies gay
>>93669532you use python for scripting? are you some kind of fucking idiot?
>>93665782quote from the dearly departed joe armstrong:Because the problem with object-oriented languages is they’ve got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle.
>>93660492For easier tutorials
Reminder that Based Basic lets you do ? "Hello World"Where ? is short for print.
>>93660182That's fucking stupid. You don't bend over to students of all things. This saves like 4 lines of code that are usually automated by IDEs. Now linters will have to be updated with this retardation.Shit change
>>93663719any simple language for writing up quick programs. Typically ones without a bunch of imports and headers. Basically bash and python.
>>93660182java is not a shitty scripting language
>>93672579it doesn't matter when you are writting something that does actually something instead of printing a text in the standard output
>>93662490as fagjava, recently learned c++, just a few days adapt to it and i can do my own programming.the only thing that is confusing is the use of pointers
>>93660697>Probably making it easier for brainlets to get into Java.And really misses the point about why Java is not a good beginner language. Hiding Java's convoluted boilerplate just for the "Hello World" special case doesn't actually solve the problem.And if you don't understand the problem, you are more stupid than the "brainlets" you're trying to criticize.
>>93665782OOP is not for "dicking around"It shines the brightest when you have a big problem to solve and you're patient enough to work out a good design for a solution, rather than a quick base implementation with a hundred patches applied
>>93665784No reason not to have both, but I guess autists hate change.
>>93675101>It shines the brightest when you have a big problem to solve and you're patient enough to work out a good design for a solutionIf you haven't at least considered and weight the tradeoffs of a non-OOP approach, though, your design is most certainly total garbage.
>>93675259OOP is the only paradigm that can have any practical solution designs for beyond trivial problemspure procedural _needs_ to split everything into smaller individual problems, otherwise it crumbles under complexityfunctional can't do big problems at allyou can't prove me wrong without shitposting or moving goalposts
>>93675496>pure proceduralIt's clear: you don't actually have any experience designing big solutions and are just talking out of your ass or parroting memes after having spent a few years as a Java wagie on some Enterprise Software Abomination.
>ad hominemnot an argument
>>93669296Most people use it for debugging. You can't tell me otherwise because practically every large Java program spams lots of messages if run from a console.
>>93660492Six figure FAANG SWE (top 0.01% of devs btw) here. I would. I needed to write a little data munging script yesterday and I literally looked up whether it's possible to run interpreted Java yet before resigning to writing it in Python which almost made me throw up.Java is a beautiful language with dogshit DX.