6 ms·
Is this the last of the F# features to be migrated into C#? What a missed opportunity. I think really F# if you combine all of its features, and what it left
by FrustratedMonky 6mo ago
Is this the last of the F# features to be migrated into C#?
What a missed opportunity. I think really F# if you combine all of its features, and what it left out, was the way. Pulling them all into C# just makes C# seem like a big bag of stuff, with no direction.
F#'s features, and also what it did not included, gave it a style and 'terseness', that still can't really be done in C#.
I don't really get it. Was a functional approach really so 'difficult'? That it didn't continue to grow and takeover.
- owlstuffing 6mo ago> Pulling them all into C# just makes C# seem like a big bag of stuff, with no direction. Agreed. Java is on the same trail.
- DarkNova6 6mo agoCare to elaborate? I think Java is showing remarkable vision and cohesion in their roadmap. Their released features are forward compatible and integrate nicely into existing syntax. I work much with C# these days and wish C# had as cohesive a syntax story. It often feels like "island of special syntax that makes you fall of a cliff".
- owlstuffing 6mo ago[dead]
- vips7L 6mo agoIt's honestly hilarious since the person you're replying to has heavily advocated Manifold which is a compiler extension to Java that adds every little feature to the language. https://github.com/manifold-systems/manifold https://github.com/manifold-systems/manifold
- CharlieDigital 6mo ago> I don't really get it To me it makes sense because C# is a very general purpose language that has many audiences. Desktop GUI apps, web APIs, a scripting engine for gaming SDKs, console apps. It does each reasonably well (with web APIs being where I think they truly shine). > Was a functional approach really so 'difficult' It is surprisingly difficult for folks to grasp functional techniques and even writing code that uses `Func`, `Action`, and delegates. Devs have no problem consuming such code, but writing such code is a different matter altogether; there is just very little training for devs to think functionally. Even after explaining why devs might want to write such code (e.g. makes testing much easier), it happens very, very rarely in our codebase.
- NanoCoaster 6mo agoAbsolutely agree. Modern C# language design feels very much lacking in vision or direction. It's mostly a bunch of shiny-looking language features being bolted on, all in ways that make the language massively more complex. Just look at this feature: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-15#collection-expression-arguments https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/cs... Was this needed? Was this necessary? It's reusing an existing keyword, fine. It's not hard to understand. But it adds a new syntax to a language that's already filled to the brim, just to save a few keystrokes? Try teaching someone C# nowadays. Completely impossible. Really, I wish they would've given F# just a tenth of the love that C# got over the years. It has issues but it could've been so much more.
- raincole 6mo ago> Try teaching someone C# nowadays. Completely impossible. Really, I wish they would've given F# just a tenth of the love that C# got over the years If they actually put effort in F#, it would have reached "unteachable" state already :)
- NanoCoaster 6mo agoHaha, yeah, maybe :) I would've loved an F# that found a way to improve on the performance issues, especially when using computation expressions. That and, either, a deeper integration of .NETs native OOP subtyping, or some form of OCaml-like module system, would have been enough to make it an almost perfect language for my tastes. Obviously, these are big, and maybe impossible, issues. But Microsoft as a whole never really dedicated enough resources to find out. I feel for the people still working on it, their work is definitely appreciated :)
- LunicLynx 6mo agoMy knowledge on functional languages is limited, but as I understand it, it’s possible to formulate expressions that are basically NP problems? And hence impossible to speed up? So is it a F# issue or inherent to functional programming?
- LunicLynx 6mo agoYou aren’t giving enough credit to the careful evaluation of how this adaption is happening. So far everything that was added to C# very much reduces the amount of dead boilerplate code other languages struggle with. Really give it an honest try before you judge it based on the summation of headlines.
- owlstuffing 6mo agoIn isolation, yes, I agree with you. But in the context of the cornucopia of other "carefully evaluated" features mixed into the melting pot, C# is a nightmare of language identities - a jack of all trades, master of none, choose your dialect language. No thanks.
- DeathArrow 6mo ago>a jack of all trades Yes, C# is a jack of all trades and can be used at many things. Web, desktop mobile, microservices, CLI, embedded software, games. Probably is not fitted for writing operating systems kernels due to the GC but most areas can be tackled with C#.
- Izikiel43 6mo ago> Probably is not fitted for writing operating systems kernels Midori would like to have a word with you: https://en.wikipedia.org/wiki/Midori_(operating_system) https://en.wikipedia.org/wiki/Midori_(operating_system) https://joeduffyblog.com/2015/11/03/blogging-about-midori/ https://joeduffyblog.com/2015/11/03/blogging-about-midori/
- pjmlp 6mo agoMany systems programming languages with GC have existed since the 1970's, we don't seem most adoption mostly due to developer culture, and monetary issues with management.
- LunicLynx 6mo agoIf it’s not for you I guess that is ok. But from your comment I would also deduct that you never professionally used it. After so many different languages it’s the only one I always comeback to. The only things that I wish for are: rusts borrow-checker and memory management. And the AOT story would be more natural. Besides that, for me, it is the general purpose language.
- raincole 6mo agoUnion is almost a net positive to C# in my opinion. But I do agree. C# is heading to a weird place. At first glance C# looks like a very explicit language, but then you have all the hidden magical tricks: you can't even tell if a (x) => x will be a Func or Expression[0], or if a $"{x}"[1] will actually be evaluated, without looking at the callee's signature. [0]: https://learn.microsoft.com/en-us/dotnet/csharp/advanced-topics/expression-trees/expression-trees-execution https://learn.microsoft.com/en-us/dotnet/csharp/advanced-top... [1]: https://learn.microsoft.com/en-us/dotnet/csharp/advanced-topics/performance/interpolated-string-handler https://learn.microsoft.com/en-us/dotnet/csharp/advanced-top...
- twisteriffic 6mo agoFrom the PoV of someone who uses C# every day those are very strange things to be upset about.
- wvenable 6mo ago> you can't even tell if... In the places where that is a thing, I've never needed to care. (Which is kind of the point)
- zigzag312 6mo agoI personally like the direction C# is taking. A multi-paradigm language with GC and flexibility to allow you to write highly expressive or high performance code. Better than a new language for each task, like you have with Go (microservices) and Dart (GUI). I'm using F# on a personal project and while it is a great language I think the syntax can be less readable than that of C#. C# code can contain a bit too much boilerplate keywords, but it has a clear structure. Lack of parenthesis in F# make it harder to grasp the structure of the code at a glance.
- pjmlp 6mo agoMicrosoft's management has always behaved as if it was a mistake to have added F# into Visual Studio 2010, and being stuck finding a purpose for it. Note that most of its development is still by the open source community and its tooling is an outsider for Visual Studio, where everything else is shared between Visual Basic and C#. With the official deprecation of VB, and C++/CLI, even though the community keeps going with F#, CLR has changed meaning to C# Language Runtime, for all practical purposes. Also UWP never officially supported F#, although you could get it running with some hacks. Similarly with ongoing Native AOT, there are some F# features that break under AOT and might never be rewritten. A lost opportunity indeed.
- dathinab 6mo ago> big bag of stuff, with no direction. also called general purpose, general style langue > that still can't really be done in C# I would think about it more as them including features other more general purpose languages with a "general" style have adopted then "migrating F# features into C#, as you have mentioned there are major differences between how C# and F# do discriminated sum types. I.e. it look more like it got inspired by it's competition like e.g. Java (via. sealed interface), Rust (via. enum), TypeScript (via structural typing & literal types) etc. > Was a functional approach really so 'difficult'? it was never difficult to use but it was very different in most aspects which makes it difficult to push, sell, adapt etc. that the maybe most wide used functional language (Haskel) has a very bad reputation about being unnecessary complicated and obscure to use with a lot of CS-terminology/pseudo-elitism gate keeping doesn't exactly help. (Also to be clear I'm not saying it has this properties, but it has the reputation, or at least had that reputation for a long time)
- FrustratedMonky 6mo ago"reputation about being unnecessary complicated and obscure to use with a lot of CS-terminology/pseudo-elitism gate keeping doesn't exactly help" Probably more this than any technical reason. More about culture and installed view points. I don't want to get into the objects/function wars, but do think pretty much every technical problem can be solved better with functions. BUT, it would take an entire industries to re-tool. So think it was more about inertia. Inertia won.
- DeathArrow 6mo ago>Is this the last of the F# features to be migrated into C#? >What a missed opportunity. Not adding functional features to F# doesn't mean F# would have gained more usage. And if someone wants to use F#, no one is stopping him or her.
- FrustratedMonky 6mo agoI meant, 'missed', in that the entire industry would have been better off if F# or functional programming had won out over object oriented/C# styles. But, that would takes, schools changing, companies changing, everything. So it was really the installed base that won, not what was better. We'd have to go back in time, and have some ML Language win over C++ .
- jayd16 6mo agoPurity is overrated. C# is a kitchen sink language but you need give credit to the language designers. Compared to C++, for example, C# feels feature rich and consistent even though it abandons purity.
- FrustratedMonky 6mo agoI think purity matters where you can have the compiler catch problems.
- jayd16 6mo agoC# has fantastic tooling, though. Its a hidden feature but to the credit of the language designers, I don't think they often abandon compiler features for dev features. For example, C# chose not to go down the route of type erasure for the sake of generics and because of that you don't get the same sort of runtime type issues that Java might have.
- loglog 6mo agoThat's a very low bar. Any language feels consistent compared to C++.