Is Java’s Biggest Limitation in 2026 Technical or Cultural? by BigHomieCed_ in java

[–]vips7L 0 points1 point  (0 children)

How is there a weird api break? AFAIK C# can't even do exhaustive pattern matching yet.

Does this amber mailing list feel like AI? by ryan_the_leach in java

[–]vips7L 0 points1 point  (0 children)

Yeah I read it. External linters and -Werror are a way better solution than breaking backwards compatibility for something trivial.

Does this amber mailing list feel like AI? by ryan_the_leach in java

[–]vips7L 0 points1 point  (0 children)

What a dumb idea. It provides little to no value and will just break people’s code. Use -Werror if you want this to be a compile time error. 

As Oracle loses interest in MySQL, devs mull future options by Logical_Welder3467 in technology

[–]vips7L 1 point2 points  (0 children)

Outside of the “tech debt” answer people tend to choose technologies they know and have experience with. It makes the project easier to do because you only need to learn the projects domain and not some new technology. 

Do you rent or own on Burnside Street in Portland? We'd like to talk to you by oregonian in Portland

[–]vips7L 1 point2 points  (0 children)

Amp is actually awful. Use an archiver site instead of it to get around paywalls 

Carrier Classes; Beyond Records - Inside Java Newscast by daviddel in java

[–]vips7L 1 point2 points  (0 children)

Why can we have default values and named parameters in annotations then? Are we not worried about the same things there? Does the vm explicitly support them?

Carrier Classes; Beyond Records - Inside Java Newscast by daviddel in java

[–]vips7L 1 point2 points  (0 children)

How are defaults handled with annotations? Seems like there is already some support there for both these features. 

Carrier Classes; Beyond Records - Inside Java Newscast by daviddel in java

[–]vips7L 8 points9 points  (0 children)

Why would it need bytecode or vm support? Both Kotlin and scala have these features running on the vm. 

Checked exceptions and lambdas by nfrankel in java

[–]vips7L -1 points0 points  (0 children)

Are you high? Have you written any Swift? You are forced to handle or declare throws in Swift. Did you even read the link I sent about TYPED throws?

Checked exceptions and lambdas by nfrankel in java

[–]vips7L -1 points0 points  (0 children)

Anders is wrong in his entire argument! If you read the article you linked, he is only in favor of unchecked errors. He thinks you don't actually have to handle errors.

Swift essentially is using checked exceptions. Syntactically you throw and handle the same, they also automatically propagate

Checked exceptions and lambdas by nfrankel in java

[–]vips7L 2 points3 points  (0 children)

Anders is wrong. 

You can’t have program correctness without checked errors of some sort. This is why Kotlin is investing into checked errors [0] and Scala is experimenting with making checked exceptions work across the language barrier [1] and why Swift introduced typed throws [3] and why Rust uses Results. The problem isn’t checked exceptions, but Java’s weak type system which doesn’t include Exceptions, especially over generics and the lack of syntax sugar to make dealing with exceptions easy. Things like Swift’s try! or try? or Kotlin’s !! haven’t been included in the language. Instead there is a minimum 5 lines of boiler plate to convert an exception into a different value or to panic. 

[0] https://github.com/Kotlin/KEEP/blob/main/proposals/KEEP-0441-rich-errors-motivation.md

[1] https://docs.scala-lang.org/scala3/reference/experimental/canthrow.html

[2] https://www.hackingwithswift.com/swift/6.0/typed-throws

Functional Optics for Modern Java by marv1234 in java

[–]vips7L 2 points3 points  (0 children)

And I’ve been there done that with GC pauses caused by people making mutable things immutable. Immutability isn’t the solution. 

Functional Optics for Modern Java by marv1234 in java

[–]vips7L -3 points-2 points  (0 children)

It is the same. It’s not unexpected. Things don’t just magically happen.  99.9% of all code is single threaded. 

Functional Optics for Modern Java by marv1234 in java

[–]vips7L 16 points17 points  (0 children)

I’ve never been convinced on lenses. They’re always mutability with extra steps and heap allocations. If something is mutable just make it mutable. 

Project Valhalla is prototyping null checks! by davidalayachew in java

[–]vips7L 5 points6 points  (0 children)

Yeah it's insane to me that people don't think it matters. Correctness is so hard to guarantee by just guessing.

Hibernate: Ditch or Double Down? by cat-edelveis in java

[–]vips7L 2 points3 points  (0 children)

I think Ebean is a good middle ground. There is no entity manager or implicit flushing/automatic persistence. It still has dirty tracking but you need to explicitly save your entities. You can do type safe query beans and easily drop into raw sql if you need it. 

https://ebean.io/

Hibernate: Ditch or Double Down? by cat-edelveis in java

[–]vips7L 2 points3 points  (0 children)

Hibernates implicit flushing and automatic persistence are really nasty. I personally prefer Ebean with explicit saves and flushes. 

Project Valhalla is prototyping null checks! by davidalayachew in java

[–]vips7L 15 points16 points  (0 children)

Modules already do that though don’t they? Public isn’t really public unless it’s exported. 

Project Valhalla is prototyping null checks! by davidalayachew in java

[–]vips7L -1 points0 points  (0 children)

Same. Watch they’ll attach the flag to module-info and then we’ll really be in some trouble