8 ms·
And C# edges closer still to F# F# should be Microsofts main language, not C# It's a great language that doesn't get enough attention IMO.
by LandR 7y ago
And C# edges closer still to F#
F# should be Microsofts main language, not C# It's a great language that doesn't get enough attention IMO.
- sedatk 7y agoF# is intentionally cumbersome for imperative/OOP programming which makes it impractical for many project types.
- TomMarius 7y agoWhy do you think it's intentional, and what could be done differently?
- StreamBright 7y agoCan you back this up with some examples ? I feel it is exactly the opposite. For loops, mutable dictionary, in place updates to name a few imperative things you can do with easy in F#
- juststeve 7y agoBut the .Net framework is mostly implemented C# / classes, so your F# code will always need to reference those objects from the stack which may be null etc. This is why I think MS is still building C# becuase a rewrite of .NET to pure f# is not worth it. My 2c.
- adgasf 7y agoNot at all. The class definition syntax is very terse and you can use the mutable keyword for imperative programming. In fact, I think F# is a better imperative language than C#, if you choose to use it that way.
- StreamBright 7y agoYep this is my experience as well. isNull make it easy to pattern match on null, the only thing I really needed to have a terse way of dealing with outside word, either C# modules or IO that can have nulls. I was shocked how smooth everything is. I was productive maybe in 2 days without prior knowledge of the entire MS/.NET/C# world. The reason why I chose F# was because of the similarity to OCaml's syntax.
- tigershark 7y agoThe only cumbersome part is when you need to interop with C#. The .net event syntax is ridiculous for example.
- thomasz 7y agoThe imperative features feel bolted on and underdeveloped. Just try to break out of a loop or do an early return in f#. The language really discourages the pure interface, impure implementation approach. I feel often compelled to use explicit tail recursion instead, which in turn feels like it's placed in a weird middle ground between a goto fest and structured programming.
- rienbdj 7y agoIf you allow early returns in a loop then loops are no longer expressions.
- madiathomas 7y agoFor that to happen, functional languages have to take over. Most people are just not into functional programming languages. They prefer imperative programming languages. I feel Microsoft is doing a great job of slowly forcing C#.NET Developers to learn F#. It was so easy for me to learn F#. It was so strange that I was able to understand a functional programming language. I didn't have luck learning other functional languages.