News for hackers. Stuff that matters.
Re:Elixir Is Erlang, not Ruby by devmunchies on Monday September 07, 2020 @01:36PM (#24401030)
Why C# and not F#?

I've been learning F# and OCaml the last couple weeks and I really like the syntax. (I have been using elixir for 4 years)

The main thing I don't like about OCaml is that it doesn't have method overloading. I love the arity-based (number of arguments in a function) function signatures in elixir but that's not possible in OCaml since it curries methods.

e.g. in ocaml, calling method with less arguments than expected will return a function that takes the remaining arguments:

    let add = (fun x y -> x + y)
    let add_four = add 4 (* returns a function expecting 1 arg*)
    add_four 5 (* returns 9 *)
Not a big deal but I would rather lose this built in currying in exchange for arity-based method overloading.

Otherwise, OCaml is a fast language, both compiling and runtime performance.

Re:Elixir Is Erlang, not Ruby by smabie on Monday September 07, 2020 @02:30PM (#24401434)
I agree that the lack of polymorphism is annoying. A solution to this would be modular implicits. This would allow the built-in currying to work as well.