Hacker News new | ask | show | jobs
by smitherfield 3323 days 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.

1 comments

Why are Scala's "=" function definitions questionable? It makes absolute sense since a function should return a value.
For 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.

They 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
I still fail to see what makes this questionable. It's just syntactic sugar that you don't even need to use, and which is pretty clear when you see it in the wild.
Oh yeah I don't think it's questionable at all, just guessing what they're talking about.