105 karma · joined June 14, 2021
In a case where the client expects an immediate response (http GET) getting “400 validation error: foo is not allowed to be null” is a lot more meaningful than “500 Null pointer”.
In general I try not to model invalid states - less mental overhead (no one has to tell you xyz can’t be null it just cannot be null).
Ofc this is a matter of opinion and the lines get blurred as soon ad you move stuff to runtime.
Java spring does the same thing: if you use an unboxed type (int instead of Integer) and the client passes in null, the handler will never be invoked.
The extra sugar on top is super nice too - listOf, mapOf, x to y, apply… I think it just makes code that much cleaner. None of these are make or breaks but together they work amazing. A lot of what I work on professionally is still on Java 8 or 11 so I don’t get any of the cool features like record types.
Most of the OSS I do is Kotlin bedsheets I just enjoy writing Kotlin. I don’t feel that way with the older versions of Java (I’m starting to with the newer ones).
- I dislike in general code generation. This isn’t a Go thing, this is a “any language but rust” thing: macros are just _so good_. I don’t have to keep a code generator daemon running in the background, and I don’t have to worry about running a code generation step in CI.
- I dislike implicit interface adherence: this makes it so hard for me to navigate code bases. For instance, If I take a Foo interface, I just have to guess at where all the Foo implementers are?
Those are just a couple of my qualms. In general, though, I do reach towards Go for projects that I know aren’t going to hit massive scale (scale as in “need 10 developers supporting it”), and it hits the sweet spot for me that’s between prototyping in python and enterprise in Java / Rust.