Hacker News new | ask | show | jobs
by yazaddaruvala 1249 days ago
I’ve worked professionally with Java, Scala, C++, Python, Rust, JavaScript, Typescript, Ruby.

None of them are ergonomic for non-trivial applications!

The goal is to appropriately abstract away the super minority of code that deals with the non-trivial parts into a nice ergonomic interface.

Rust is frankly better than most in the list above at allowing the writer to create an ergonomic interface. Yes it’ll take the writer 3x as long in the short term to create the ergonomic interface but:

1. Relative to everything else creating/maintaining these types of internal abstractions is a super minority of time spent reading and writing code.

2. Unlike other languages, you’ll end up with fewer iterations of the interface because it’ll push the author to really understand the complete interface, rather than shipping a buggy interface that needs iteration. Also refactoring is Rust is simpler than any other of the listed languages (because it self documents more assumptions).

3. The ergonomic interface likely has already been published as a crate. I.e. don’t need to write it at all. These internal abstractions are more likely to be written in their first pass as general purpose than in other languages because of the collaborative design working with the rustc compiler.