2 ms·
C# is a stronger OO language than F#, if you prefer OOP over FP. It also has a lot of functional features that allow you to dip into FP when that is convenient.
by seanmcdirmid 12y ago
C# is a stronger OO language than F#, if you prefer OOP over FP. It also has a lot of functional features that allow you to dip into FP when that is convenient. Not as great as Scala, but definitely a huge step up from Java.
- MichaelGG 12y agoWhat in particular do you mean by this? "Protected" accessibility, automatic mutual recursion for everything, nested classes -- and a few other edges? Is that enough to say C#'s a "stronger OO" language? Perhaps strictly speaking, as in, it has those few features more. But in practise? But then what of C#, which lacks object expressions? Which forces you to declare a type, often an interface, just to implement a member or two?
- seanmcdirmid 12y agoSmall potatoes. If I have an OO design, I'm not going to be able to use modules for that, or even structural typing. If you do a lot of class programming, F# doesn't make sense.
- kvb 12y agoI don't think that's fair at all; F#'s integration with the .NET type system is one of its best features. I find that creating class types (and instances) in F# is usually easier than doing so in C#. And with object expressions, you can even program in an arguably purer object oriented style, declaring only interfaces but never concrete class types.
- deleted 12y ago[deleted]
- MichaelGG 12y agoI'm not sure how this is relevant. F# handles creating classes just fine. It's come a long way from the OCaml crosscompiler that you might be remembering.