Hacker News new | ask | show | jobs
by MichaelGG 4327 days ago
What 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?

1 comments

Small 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.
I 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.
I'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.