top | item 14399043

(no title)

hhandoko | 8 years ago

I'm currently working with Scala and recently dabbling with Elixir and Phoenix. It's a good language and great platform, however, I still prefer static typing.

I'm still getting used to dynamic typing in Elixir. Most of the time I feel like just matching against Map data structure or records.

While Dialyzer is great, writing the typespecs is a bit of a maintenance overhead. I suppose it's a tradeoff...

> I came to Elixir from Scala, [..] now I don't have to deal with the half of the Scala community that tries to make Scala into Haskell.

IMO Scala will continue to be a multi-paradigm lang. On pure-FP and libs, it's a choice and really depends on the problem domain. It might not be a good solution to everyone, but I'm glad it exists.

discuss

order

gamache|8 years ago

I think of Elixir typespecs as documentation more than as overhead. Given that I'm writing comments that tell the shape of the inputs and outputs of every function anyhow, I might as well do it in a way that lends itself to static analysis. :)