Hacker News new | ask | show | jobs
by mbac32768 311 days ago
I do not understand how they could develop a language inspired by OCaml but not bring over labeled function arguments. A real L when it comes to ergonomics.

And they just have no plans to ever fix this??

2 comments

> I do not understand how they could develop a language inspired by OCaml but not bring over labeled function arguments. A real L when it comes to ergonomics.

Is this what you desire?

  Named Arguments[0]

  Arguments for methods can be specified by position in a 
  comma-separated argument list, or they can be passed to a 
  method explicitly by providing the name, followed by an 
  equal sign and the value to be passed in. If specified by 
  providing the name, they can appear in a different order 
  from that used in the declaration.
0 - https://learn.microsoft.com/en-us/dotnet/fsharp/language-ref...
Kinda. Except in OCaml this deficiency does not exist:

> Named arguments are allowed only for methods, not for let-bound functions, function values, or lambda expressions.

> Kinda. Except in OCaml this deficiency does not exist:

  Named arguments are allowed only for methods, not for 
  let-bound functions, function values, or lambda expressions.
True. They are different languages after all, sharing a common ancestor in ML[0] yet diverging for their own reasons.

Still, the original concern was identified thusly:

>> I do not understand how they could develop a language inspired by OCaml but not bring over labeled function arguments.

0 - https://en.wikipedia.org/wiki/ML_(programming_language)

You can read this suggestion, and upvote, comment, contribute: https://github.com/fsharp/fslang-suggestions/issues/1434