Hacker News new | past | comments | ask | show | jobs | submit login

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.




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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: