Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
icholy
· 6y ago · 0 comments
Idiomatic Java has much more boilerplate than idiomatic Go.
Comments
[–]
bdamm
6y ago
if e3 != nil { return _, e3 }
over and over and over..
[–]
zzbzq
6y ago
Control flow is not boilerplate, that's the application logic.
[–]
nicoburns
6y ago
It's boilerplate compared to languages with exceptions where this code isn't necessary, or Rust where the equivalent code is:
e3?
^ Go could very easily add this syntax, but haven't for some reason.
[–]
excursionist
6y ago
Idioms change, java can be much less boilerplate today.
[–]
disintegore
6y ago
Java has generics
[–]
randomidiot666
6y ago
Sounds like you're not aware of the changes since Java 8 (2014). This is idiomatic Java nowadays:
http://sparkjava.com
[–]
LaSombra
6y ago
Unfortunately not many developers are.
[–]
jswizzy
6y ago
Sorry, Android doesn't have all of Java 8 and it's mostly Kotlin now.