Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, we discovered that for my team's projects as well. Having a scala "guru" define and teach idiomatic scala has actually increased our productivity a lot. Any non-idiomatic scala is now purely for interacting with our existing Java libraries


FWIW, the constructs with the initial biggest win for us (in converting procedural thinking) were pattern matching and option types. For pattern matching, the guidelines were

- Don't do any processing after the pattern match within a function; break into smaller functions

- Reach for pattern matching before if/else

- Avoid the use of var

- Avoid dropping through to wildcard pattern. (This tip was from Yaron Minsky of OCaml fame)

In conjunction with preferring the use of combinators over loops, and using Option (and being forced to think about None), we got surprisingly functional Scala code in a short time.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: