- vips7LThe ecosystem is perfectly fine. You’re more than likely using the ecosystem when you choose Kotlin, that’s the whole point. This comment doesn’t make any sense.
- Working on finishing the last 2 books of The Expanse. My boss wants me to write a wrapper around rabbit mq though.
- This just sounds like addiction to the dopamine of instant gratification.
- > Having to type `list.map` instead of `map` or `dict.Dict` instead `Dict` a hundred times does add up over the course of a few weeks, and does not really add a lot of extra readability.
I did it in F# this year and this was my feeling as well. All of the List.map and Seq.filter would have just been better to be called off of the actual list or Seq. Not having the functions attached to the objects really hurts discoverability too.
- I don't think Oracle/OpenJdk really cares about Kotlin. It's usage is still minuscule compared to Java the language, and you're still using Java the platform by using it. I'm not sure they're really concerned about Rust either because it doesn't fill the same use cases. Go might be a concern, but who knows. I personally find Go the language to be worse then Java the language.
- I believe that is mostly due to Sun's stagnation and lack of funding. Oracle released Java 7 in 2011 and Java 8 in 2014, which is arguably the start of modernizing Java.
- Trivial apps are easy. Non trivial apps, lots of reflection, etc make it really hard.
- Java is in the best shape it's ever been in. Jdk development and performance are through the roof and the developer experiences gets better with every release.
- Kind of like how sum types and matching are implemented in library code? Example from D here:
Fahrenheit toFahrenheit(Temperature t) { return Fahrenheit( t.match!( (Fahrenheit f) => f.degrees, (Celsius c) => c.degrees * 9.0/5 + 32, (Kelvin k) => k.degrees * 9.0/5 - 459.4 ) ); } - Funny part is that Java does have named parameters, but only for annotations!
- I've always seen the visitor pattern as a poor-mans pattern matching. How do you solve the same thing with callbacks?
- Love how you were downvoted for mentioning Java.
- Crazy! I graduated highschool in 2008. I never got the games. Though now I do think I’m interested in learning a bit with C#.
- Yes there was a proposal by Brian to make it into a switch expression: https://www.hackerneue.com/item?id=40088719, though that draft is already 1.5 years old and I don't expect it to be delivered anytime soon. It would alleviate some pain, but I really think we need something like try! to escape the compiler when some errors aren't possible:
becomesA a; try { a = someThrowingFn(); } catch (AException ex) { throw new IllegalStateException(ex); // not possible }
or with Brian's proposal:var a = try! someThrowingFn();
...still a bit verbose and funkyvar a = switch (someThrowingFn()) { case A anA -> anA; case throws AException ex -> throw new IllegalStateException(ex); }You should check out Kotlin's proposal for error unions, I think it's pretty good and prevents a lot of boiler plate associated with results/exceptions: https://github.com/Kotlin/KEEP/blob/main/proposals/KEEP-0441.... They propose a similar construct to try! with !! like they have for nullable types.
- Nah man. They could make checked exceptions less boiler platey. Simple things like Swift’s try! Or try?, and making the try construct an expression would go a long way to increase checked error usage and therefore correctness. We don’t even need to solve the lambda problem. We just need to make it easy to deal with checked exceptions. Right now you have a minimum 5 lines of boiler plate to escape them.
- I don’t know anyone that learned C++ first. Maybe I’m younger in generations, but Java was the first thing everyone learned at my university.
- I really do wish them luck! C# is a really nice language and I can't wait to see what they do once they introduce sum types. I've been doing Advent of Code in F# and it's been pretty nice.
- I started this thread criticizing Go. I think it’s a terribly verbose language that has ignored all language dev of the last half century. It’s why I continue to write Java.
However, I don’t think that shields Java from its inability to make the language better. We still don’t have checked nulls and at this rate, even though there’s a draft JEP, I am not sure we will get them within this decade. The community still blindly throws unchecked exceptions because checked exceptions have received no investment to make them easy to work with.
The point of this thread is that people do want that. They want a natively compiled language (by default), that has checked nulls, errors represented in the type system, and has a GC.
- With the same difficulties as Java.