It's a shame that people don't want to use F# but prise C# for how cool it became and continue becoming. At the same time, little do they know that many of the features were simply drawn from F#.

It's just rediculous how far this OO and C-Style syntax crap has progressed. They keep copying things from functional langugages, making the initial language to be a monstrocity like C++ is now, insted of just using languages like C#. I mean, it was right there before C#: async/task, immutablility, records, indexes, lambdas, non-null by default, who the hell knows what else.
Besides, many people (in my company at least) are just blindly overengineering with patterns and shit, where a simple function would be just enogh.

Watch some some NDC talks about F#, in particular those of Scott Wlaschin. It's just better in so many ways: less noice (I'm looking at you, brackets, commas and semicolons), the whole LOT of type inference and less duplication (just look at the C# signatures of linq methods - it's difficult to read them), immutability by default, non-nullable by default, ADTs and pattern matching, some neat features like type providers (how many times have used "paste special" or an online tool to create C# classes from a JSON/XML file, and how many times have your regenrated it because of schema changes?) and units of measure.

Of course, in some cases it's not optimal, in some cases mutable datastructures of C# are better for performance. But dude, how many performance critical systems have you wrote in C#? I mean, if it comes to performance you should use Rust or C++ or C after all.


  • 2
    Two words on why all of what you said I cannot agree with.

    Vendor lock-in
  • 0
    @sariel Well, yeah. It was more like retoric question.
  • 0
    Also, humans are lazy fucks. A year ago, I asked my colegue that works on Java for 7 years or so, if they had a chance to try Kotlin instead. Dude, he made 20 cents eyes watching on me. They didn't even know Kotlin exist. And thouse few who know think it's a language for writing Android apps.

    People just don't give a shit. They're paid their $n/hour to write Java/C# and they just don't give a shit about other things.
  • 2
    Every month there's N number of things to learn just to keep up. Or to keep up in your team.

    Maybe people don't have the scope to learn things they don't need today
  • 1
    @Crost, I aggree that learning a new language and especially mastering it will take lots of time. But looking at how my teammates use their tools, makes me think they are not capabale of learning at all. Most of them just stuck with 5-10 years old knowledge. I have to sit and stick Java Streams / C# Linq into them, because they keep writing loops. And even then, I ocasionally see that people just do

    var list = new List<int>();

    sourceList.ForEach(item => list.add(i * 10));

    Most of them don't understand how to use Stream<T> (java), Enumerable<T>(c#). They just do Lists all the way.

  • 1
    Imagine changing an entire tech stack just to program in a different style. In C++ I don't have to.

    The nice part of C++ is it is evolving. I am excited about modules and yield. I really like the generators as seen in Python. The biggest issue I see with C++ is if they are not careful it will an expert only language.
  • 4
    Have you ever considered that people don't want to use functional languages?
  • 0
    @12bitfloat *gasp* HOW DARE THEY!
  • 0
    @12bitfloat and that is so weird. Why would you not want to?
  • 0
    @sariel how does vendor lock-in come in to this? F# and C# exist in the same ecosystem, and where you can use one, you can use the other!
  • 0
    @100110111 Because it's very different from what people are used to and doesn't lend itself to some forms of software (e.g. low level system software)

    In my humble opinion FP is also very misguided, trying to solve things in ways that just produce more problems. Forbidding mutation wholesale (unless it is allowed and enables memory unsafety... Haskell) is just not a good idea. Just like it's not a good idea to forbid shared memory ala the CSP model. What you really want is sometimes mutation and sometimes shared data. And like I said, as a systems programmer I don't like writing software where I can't reasonably infer what instructions will be emitted by what operation, but that might just be a me problem
  • 0
    @100110111 who maintains c# and f#


    It's vendor lock-in because you have to use their tools to develop and host it.

    Their licensing

    Their OS

    Their server

    Now the app that took two years to get off the ground is going to cost the company twice as much because Microsoft decided to double the licensing fees.

    Also, don't think for a minute that Microsoft won't stop supporting on-prem server hosting and lieu of Azure cloud hosting. Now that app that was twice as much will cost you between 25-400% more based off your original cost analysis.

    This is why F500 companies usually use .NET for their primary applications because they can easily absorb those costs when they can't strongarm their way out of negotiations with Microsoft. These costs are usually pushed down to the consumers or product-line.

    Vendor lock-in is a bitch and you won't know how bad it is until you experience it.
  • 1
    i actually am aware how many features C# is pulling from F#, since I was lowkey trying to learn basics of F#, and the things it's pulling is things i very much liked, in most cases.

    at the same time, I... eh... and this will be embarrassing... like the C# syntax, actually... and it was difficult to wrap my head around f#s...

    I still plan on continue learning F#, but in recent years, ...i had so little energy or resolve to spend time on mentally exhausting things like learning a whole new syntax as well as semantic paradigm, that... well... i'm ashamed of myself :(
  • 0

    well... let's be honest though, LINQ is great, but in the end it's still just loops wrapped in functions with a fancy signature...
  • 1
    @sariel vendor lock-in’s a bitch, but using a .NET lang alone isn’t a road to it. I happily use F# - or C# for that matter - as far away from other M$ products as possible.
Add Comment