News for hackers. Stuff that matters.
Re:Java 21 makes me like Java again by taf2 on Saturday September 16, 2023 @05:58PM (#37539145)
do/i/still/need/to/create/sub/directories/for/the/things/i/want/namespace?
Re:Java 21 makes me like Java again by mdaniel on Saturday September 16, 2023 @06:12PM (#37539290)
Only if you're using vim like someone from the 70s, otherwise any sane IDE handles those things for you

But, yes, namespaces are still mapped to paths, it's not like they rewrote the JVM to use blockchain or something

Re:Java 21 makes me like Java again by ttyyzz on Saturday September 16, 2023 @06:26PM (#37539401)
Yeah I really like my IDE doing stuff in the background without me knowing shit about it.
Re:Java 21 makes me like Java again by piva00 on Saturday September 16, 2023 @06:31PM (#37539454)
Yeah, I do like my IDE doing the tedious work for me. It's also really nice to unzip any JAR I need to troubleshoot and know exactly where to navigate to find exactly the file with the code I need.

I like Golang a lot but the standardisation and verbosity in Java-land has some benefits after you get used to it enough to learn to ignore the boilerplate, it's pretty good to have some kind of consistency enforced by the VM when working in large codebases.

Re:Java 21 makes me like Java again by quickthrower2 on Saturday September 16, 2023 @10:45PM (#37540986)
Yes some C# codebases end up with wildly inconsistent namespacing as you can do anything you like
Re:Java 21 makes me like Java again by threeseed on Saturday September 16, 2023 @07:26PM (#37539864)
I don't understand how it is doing stuff in the background.

You literally ask it to move some class and then it does it. And it's very obvious what it's doing.

Re:Java 21 makes me like Java again by Too on Sunday September 17, 2023 @07:16AM (#37543788)
Then you’d be thrilled to hear about all the stuff your NVME drivers are doing in the background without you knowing shit about it. Or maybe you prefer to engrave your ones and zeroes in stone by hand?

Abstractions exist for a reason. In Java, that abstraction is coding in classes and packages, not files of text.

Re:Java 21 makes me like Java again by imbnwa on Saturday September 16, 2023 @07:03PM (#37539688)
>Only if you're using vim like someone from the 70s, otherwise any sane IDE handles those things for you

I don't think that's quite it when Ruby is also from the 90s and figured out not to tie namespace resolution to the directory tree

Re:Java 21 makes me like Java again by segfaltnh on Saturday September 16, 2023 @11:16PM (#37541177)
Let's not hold ruby up as a poster child for modularity.
Re:Java 21 makes me like Java again by unlikelytomato on Saturday September 16, 2023 @11:23PM (#37541216)
I am not sure why this is a problem. Looking at the organization of the resources directory of every project I've ever worked on, I am not sure I want more opportunity for physical and logical concepts to unnecessarily diverge.
Re:Java 21 makes me like Java again by imbnwa on Sunday September 17, 2023 @12:02PM (#37546493)
I mean, its the same idea as custom path config in TypeScript
Re:Java 21 makes me like Java again by chii on Saturday September 16, 2023 @11:45PM (#37541322)
better_than_having_just_a_single_file_that_have_lots_of_functions_without_namespacing
Re:Java 21 makes me like Java again by kaba0 on Sunday September 17, 2023 @02:54AM (#37542222)
Or import ../../../../../asd
Re:Java 21 makes me like Java again by paulddraper on Sunday September 17, 2023 @12:06AM (#37541440)
Yeah, just like Python, Ruby, JavaScript.
Re:Java 21 makes me like Java again by imbnwa on Sunday September 17, 2023 @12:03PM (#37546512)
Ruby modules aren't tied to the file system
Re:Java 21 makes me like Java again by paulddraper on Sunday September 17, 2023 @02:46PM (#37548149)
True, but they are loaded by path.
Re:Java 21 makes me like Java again by wscp-dev on Sunday September 17, 2023 @01:41AM (#37541873)
Yes/you/do/but/the/ide/does/it/for/you/so...
Re:Java 21 makes me like Java again by javcasas on Sunday September 17, 2023 @04:05AM (#37542667)
The/ide/giveths/the/ide/takeths/all/this/could/be/easier/and/you/know/it.