4 ms·
It's obviously very strongly influenced by Scala, to the point of adopting a number of its syntax decisions that are considered questionable (procedure syntax,
by smitherfield 9y ago
It's obviously very strongly influenced by Scala, to the point of adopting a number of its syntax decisions that are considered questionable (procedure syntax, infix notation, "=" function definitions).
I will echo what the others have said; it's not what I would choose, but in practice it's never been a problem when I'm writing Scala.
- Cyph0n 9y agoWhy are Scala's "=" function definitions questionable? It makes absolute sense since a function should return a value.
- joshlemer 9y agoThey might be referring to the update methods: val array = new Array[String](10) array.update(7, "hello") array(7) = "hello" // simply calls out to update
- smitherfield 9y agoFor the same reason omitting braces in C-style-syntax conditionals and loops is questionable, i.e. misleading indentation. As a bit of an unreformed code golfer and a fan of ML-style syntax, I actually kinda like it myself; I was just listing a few things that are "considered questionable" (by some people) and present in both languages.