4 ms·
So far it's the best style guide I've seen for Scala. Much more pragmatic, and actually very close to the way I naturally write Scala. I love the instruction to
by eranation 12y ago
So far it's the best style guide I've seen for Scala. Much more pragmatic, and actually very close to the way I naturally write Scala. I love the instruction to avoid symbolic methods unless they are really using symbols that everyone use (+ - / * etc...) I really hate all the ~> <|-|> <:< madness, it gives Scala a really bad name.
I like it how they prefer JAVA_STYLE_CONSTANTS over ScalaStyleConstants and same thing for annotations.
The instruction on Implicits is really making sense. use it if you build a DSL or use it internally, keep the principle of least astonishment.
Great style guide. I'm adopting it. It's strict on one way, but let's you escape if you have a reason.
The only caveat is what others have mentioned regarding monadic chaining. I prefer to use for-yield when it's clear that I'm working with collection transformations, nested futures, and even nested options. only when it's too cumbersome to read I break it down to the desugared form.
- rxin 12y agoGlad you liked it! I left another comment about for-yield in a separate comment.
- saryant 12y ago> So far it's the best style guide I've seen for Scala. Much more pragmatic, and actually very close to the way I naturally write Scala. I love the instruction to avoid symbolic methods unless they are really using symbols that everyone use (+ - / * etc...) I really hate all the ~> <|-|> <:< madness, it gives Scala a really bad name. From the official style guide: > Symbolic Method Names: Avoid! http://docs.scala-lang.org/style/naming-conventions.html#symbolic_method_names http://docs.scala-lang.org/style/naming-conventions.html#sym...