r/ProgrammerHumor • • Apr 15 '21

That took a wild turn

Post image
9.4k Upvotes

263 comments sorted by

View all comments

Show parent comment

17

u/TomGraphy Apr 15 '21

Yeah that is an issue. You can usually just break up a line though at least in Java.

3

u/Terrain2 Apr 15 '21 edited Apr 15 '21

This is why i dislike semicolonless languages

Kotlin, wanna return a really long expression that barely fits the rules on the next line for some reason?

return
    "Some Really Long Ass $interpolated String With Bullshit In It";

The second line gives a warning about unreachable code, and the first one shows an error because you can't return without a value unless the return type is Unit

There's no winning, either you split too much like Kotlin, or you split too little like js

3

u/troglo-dyke Apr 16 '21

All criticisms of kotlin are void because it's a language that lets you write suspend fun before doing anything serious

2

u/Nilstrieb Apr 18 '21

fun die()