I've tended to use Ben's suggestion in my own work; I'm not sure where
I picked it up from, but it feels "right" to me.
Although possibly that's just because of similarities with other
languages I use that use curly braces to denote code blocks too.
As far as style and readability goes, I'm a strong believe in breaking
up long lines.
If your line is so long and complex that you needed to break out the
unicode characters, then I'd suggest a better alternative would be to
switch to newlines between operations instead. Also, replace the
internal mini-blocks with the name of a lexical function created
specifically for it and placed nearby.
For example, before:
def thingy = foo.map(a => a*f(a)).map("widget_" +
_).map(_.toChars.length).reduce(_+)
Could be changed to something like:
def fa(a: Thing) = a*f(a)
def thingy =
foo map(fa)
map("widget_" + _)
map(_.toChars.length)
reduce(_+)
(Although maybe you need to leave trailing dots in there to cope with
the scala compiler's end-of-statement heuristic)
I don't know how that goes down with everyone else's idea of style
though.. It does feel far more readable to me though, especially as
the length of the original statement increases.