2 ms·
I don't know that I can defend the article's claim of "objectively better syntax," but do have a few off hand thoughts of perhaps better signal-to-nose ratio (I
by arwhatever 9y ago
I don't know that I can defend the article's claim of "objectively better syntax," but do have a few off hand thoughts of perhaps better signal-to-nose ratio (I guess using C# as a baseline): 1) single-case unions declared in one line of code 2) readonly data structures requiring much less code 3) being able to glue 2 arbitrary things together without needing a class (thinking of partial application, though of course both languages support tuples) 4) optional type annotations, not something you might want to go too overboard with, but imagine how useful in cases where the variable/value has the same name as the type 5) pipe-forward operator, which relieves you from having to declare variables (and choose names for those variables) just to pass the outcome of each line of code to the next line ...
- weberc2 9y agoI agree with all of those things, but they would apply equally if F# used parens, commas, and curly braces.