News for hackers. Stuff that matters.
Re:Scala: Where it came from, Where it's going by azinman2 on Tuesday March 17, 2015 @03:31PM (#9220645)
Care to point out the reason then? Not sure why you assumed I don't care to find out, especially given I've stated that I've been using Scala since 2009 and love the language.
Re:Scala: Where it came from, Where it's going by sixbrx on Tuesday March 17, 2015 @04:13PM (#9221047)
The square brackets are used already for type parameters on types. I do think they are easier to read than angle brackets are, for some reason. There was some discussion on this point in the Rust community as well recently where it was noted several people found square brackets easier to read and wanted to emulate Scala here (and another group wanting emulate D, using () for both!).

Another reason is that an IndexedSeq is really itself a function (extends Function1), so the parens are literally function application, not some specially interpreted syntax for indexing.

Re:Scala: Where it came from, Where it's going by ArturSoler on Tuesday March 17, 2015 @04:06PM (#9220989)
It's () instead of [] because it's a regular function call. It's related to the scalability thing that Odersky also mentions (as much functionality in libraries as possible, rather than in the language).
Re:Scala: Where it came from, Where it's going by shogun21 on Tuesday March 17, 2015 @04:25PM (#9221154)
When it comes to arrays, they use () to emphasize the fact that this is a function- arr(1) is arr.apply(1)- instead of directly accessing an element like other languages.

Scala makes sense and has a logic behind all its reasons, but sometimes it seems to go against convention for the sake of its own philosophy.

Re:Scala: Where it came from, Where it's going by azth on Tuesday March 17, 2015 @04:10PM (#9221019)
I'm assuming it's to unify the `apply()` operation between collections (maps, sequences, arrays, etc). The collection library derives from a trait hierarchy, and an array is one of these collection types.
Re:Scala: Where it came from, Where it's going by acjohnson55 on Wednesday March 18, 2015 @01:09AM (#9223737)
Not just between collections, but functions as a whole. An indexed sequenced is essentially a mapping (read: function) from the integers to whatever the element type is. Scala makes that explicit, rather than creating another mapping operator, as though they failed to notice the symmetry.

I would characterize this sort of thinking as one of the core principles of the language design. The designers search for underlying generality and bring it to the surface of the language. This can be a little frustrating at times, since humans aren't necessarily geared toward abstraction. But investment in understanding the abstractions pays off again and again.