Hacker News new | ask | show | jobs
by hejsna 4747 days ago
It seemed like most of his slides came down to the old typed/untyped flame war. Yes, in Scala you can look at your objects in an IDE and be told what type they are, in Ruby you can't. Some organizations and people need that, some don't. And yes, it's easier to optimize typed languages. Some applications need that extra speed, most don't.

I'm happy he found a language he enjoys working with, but I doubt this will change anyone's mind...

1 comments

Somewhat true but I find Scala's inferred typing a surprisingly great compromise between the two.

For example:

val i = 1;

i = "some string" // throws a compiler error, because it knows i is an integer

It's great when you haven't declared the types, you change for example an int to a double or a class to some other class (eg swapping a data structure) and it just flows through the code base without problems like a dynamically typed language.

It can also be pretty useful to look up types when they get complex in the middle of some function, like a Map[List[(String,SomeObject)]] (a map of lists of (String,SomeObject) tuples). Allowing the types to get complex lets me focus on the problem while giving a crutch to quickly remember where it's at half way through (and while finding other methods/source of data) and keep moving towards the solution.