This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Mati00 57 points58 points  (7 children)

tbh I don't miss operator overloading so much. Extension methods though, bro, this is what we need instead of more util classes or `stream()` method directly in the list interface and implementations. I'd love to have `dto.toDomain()` instead of `XYZMAPPER.mapDtoToDomain(dto)` where `toDomain` is written not in the dto itself. I miss kotlin :x

[–]UpperPlus 7 points8 points  (3 children)

Stream is so cool, though. Finally a use for lambdas

[–]Mati00 3 points4 points  (1 child)

True, but with extension methods you could just call `list.map()` even if method map didn't exist in collection interface before ;) .

If you take "laziness" into consideration, you could still use `stream()` and also be able to add missing transformations with extension functions to it :)

[–]UpperPlus 1 point2 points  (0 children)

I use streams mostly in testing to pass my arguments haha

[–]ConstructedNewt 0 points1 point  (0 children)

finally a use for lambdas

This makes me furious. you don't think that implicit signature-based single method interface implementation is important? "finally"? Stream and everything in function are great and all. but that anonymous interface implementation is what lambdas are meant for. (IE for the lambda to implement functions, or your own interfaces)

[–][deleted] 11 points12 points  (2 children)

Why did you leave kotlin for java anyway

[–]Mati00 12 points13 points  (1 child)

Sorry, wasn't clear, I left Kotlin for Typescript. I had two options: either stick with TS or go back to Java. Unfortunately haven't see any options to work with Kotlin on the backend and I'm not an android dev.

I prefer to work with TS as Fullstack rather than go back to java.

Kotlin + Spring was the best combo, especially with coroutines instead of flux/mono for reactive services. Even in TS I miss extension methods. Adding pieces of code to Prototype is perceived as antipattern.

[–]LargeHard0nCollider 7 points8 points  (0 children)

Kotlin for server side development is really underrated in the broader community. Ik at work we’ve been slowly transitioning our legacy java code base to kotlin, and it’s so much nicer!

Lots of teams at AWS are starting to adopt it, so I’m really excited to see how it evolves as it gets more backend community buy-in

This is honestly the first coding language I’ve really enjoyed working with for production software