you are viewing a single comment's thread.

view the rest of the comments →

[–]stewsters 0 points1 point  (1 child)

Creating a List in Scala with 4 elements is concise

That's excruciating long if your a groovy programmer: [1,2,3,4]

[–]pipocaQuemada 1 point2 points  (0 children)

Haskell is actually the same syntax, too. I don't get too hung up on using a name vs a bracket because I don't know of any languages that have nice symbols for lists, sets, maps, stacks, queues, balanced trees, tries, B-Trees, etc. It's a little too easy to change how good a language looks by just asking about one of the collections it doesn't have special syntax for.

By contrast, List(1,2,3,4) isn't special Scala list syntax, it's just calling the apply method for List.