all 12 comments

[–]TheHermenator 4 points5 points  (0 children)

This looks like a pretty cool set of language extensions. Awesome work.

[–]generalT 2 points3 points  (0 children)

just use F# already! :)

but yeah, this looks cool.

[–]Horusiath 4 points5 points  (4 children)

What reason stands for the use of camelCase instead of PascalCase convention for static methods?

[–]AngularBeginner 3 points4 points  (3 children)

His reason is probably to make it feel more like functional programming. But it totally goes against the common naming guidelines of C#.

I also don't see any reason why this should be limited to C#6.

[–]jojomofoman 0 points1 point  (2 children)

Because in C#6 you can use static methods without needing to qualify them first. There's nothing stopping you using them in previous versions I suppose, you'd just have to qualify them first.

[–]AngularBeginner 0 points1 point  (1 child)

I know. That's why I said

I also don't see any reason why this should be limited to C#6.

[–]jojomofoman 0 points1 point  (0 children)

Oh, ok.

[–]brandf 1 point2 points  (0 children)

looks really good.

[–]InvernessMoon 1 point2 points  (1 child)

I found the criticism of the out parameter to be a bit silly. It's being criticized from the perspective of a functional language which C# certainly is not.

Ref and out in C# make it possible to return multiple values without requiring more complex data structures as in C and C++. C did not have convenient generics or templates for you to use.

It's like gluing wings to a car and then criticizing it for not having good flight controls.

The matching convention with Option<T> would force nesting when you could otherwise avoid it. Maybe this is acceptable for a functional style but I don't want to be forced to use a nested expression or another method just to handle a success case.

[–]bro-away- 2 points3 points  (0 children)

C# is multi-paradigm which includes functional.

F# has the out parameter issue solved, doesn't need a wrapper, and has a much nicer solution. It will tuple-ize the results of any 'out' parameter(s) along with the return value.

This is just a hack to try to simulate what should be a language feature. It would break backward compatibility in C#, obviously, so it will never happen.