News for hackers. Stuff that matters.
Re:Monads in Elixir by kaeluka on Sunday May 31, 2015 @12:21PM (#9634595)
This is an example where you'd really want static types for ergonomics. Having to name the monad explicitly does not allow to write generic code (i.e, instead of saying `Maybe.return` to just say `return).
Re:Monads in Elixir by LesZedCB on Sunday May 31, 2015 @01:34PM (#9634841)
Yes, in writing ruby during my day job, I often have conflicting feelings about dynamic typing. The other advantage would be being able to do real static analysis, I would love that.
Re:Monads in Elixir by rozap on Sunday May 31, 2015 @05:13PM (#9635573)
In Elixir you can annotate functions with type signatures and then use a tool like Dialyzer(1) to perform static analysis on the compiled bytecode. There is tooling that integrates with mix in Elixir called which makes this easy(2)

1) http://www.erlang.org/doc/apps/dialyzer/dialyzer_chapter.htm... 2) https://github.com/jeremyjh/dialyxir