Chapter 3. Modicum of style—coding conventions

 

In this chapter
  • The dangers of dragging old coding conventions into Scala
  • Working with end-of-line inference
  • Avoiding dangerous names for variables
  • Ensuring correct behavior with annotations

 

This chapter presents style suggestions that will help you avoid compiler or runtime errors. Style issues are usually a “holy war” among developers, who each has her own opinions. But there are certain things that Scala allows from a style perspective that can cause logic or runtime issues in your programs. This chapter doesn’t try to proselytize you into whether you should place spaces between parenthesis or what the best number of spaces for indentation is. This chapter merely presents a few styles ...

Get Scala in Depth now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.