7 ms·
C# nails this consistently, it's not worth hand waving it away because it isn't FOSS. Rust drama itself suggests that a FOSS language doesn't shield it from cor
by kkukshtel 2y ago
C# nails this consistently, it's not worth hand waving it away because it isn't FOSS. Rust drama itself suggests that a FOSS language doesn't shield it from corporate meddling.
- raddan 2y agoThe C# compiler has an MIT license and is available on GitHub, which is about as FOSS as it gets. https://github.com/dotnet/roslyn https://github.com/dotnet/roslyn
- crote 2y agoThe compiler is one thing, the ecosystem is another. Sure, you can compile and host your .NET Core web app on Linux these days, but desktop applications are a completely different beast. You're often lucky if one exists at all, and if it does there's a decent chance it's not designed for "modern" C#-on-Linux. It really isn't a viable option yet, maybe in a decade or two.
- stanac 2y agoWPF is MIT licensed, available on github. The fact that it's windows only doesn't make it less FOSS. Microsoft doesn't have incentive to port it to other platforms but other people and companies are free to do that.
- MarkSweep 2y agoWPF is not the best example of open source, as some components are still closed source. Though it only runs on Windows, a closed source operating system, so perhaps that is not so important. https://github.com/dotnet/wpf/issues/2554 https://github.com/dotnet/wpf/issues/2554 That said, there are cross platform, open source .NET UI frameworks out there, including one that is inspired by WPF: https://avaloniaui.net/ https://avaloniaui.net/
- galangalalgol 2y agoThose are good points, but my problem with c# is that it isn't as performant in Linux. On Linux I'd suggest go as the more performant option. In any case I like both of those so much more than swift. Swift is slower even with bounds checks off. You can't turn them off in go.
- aljgz 2y ago> but my problem with c# is that it isn't as performant in Linux Any evidence for this? From the benchmark game it seems like c# is more performant than go, and measurements are done on Linux. https://benchmarksgame-team.pages.debian.net/benchmarksgame/box-plot-summary-charts.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- galangalalgol 2y agoI think it is because I generally look at a given benchmark there and don't browse below the "optimized" section to look at solutions that use intrinsics directly. Being able to use intrinsics directly is a great feature, but doesn't fit in with the whole "fast but not so fast I need to worry about safety" theme. When you exclude solutions that use intrinsics, go is faster. I use rust as my daily driver at work and home. I don't think I'd select either go or c# for a project. When I just want something that works, and I'm not worried about performance, rust is easy to use. It is only when I'm trying to squeeze out performance it gets hard. It is hard to convince go that it is safe to skip bounds checks, and while writing intrinsics isn't hard, it isn't very portable and you have to write lots of versions unless you metaprogram it, which I find harder than idiomatic code in any of these languages. Squeezing out performance is easy in c++, even in c++17, but it usually entails doing something that will "probably always be ok". Doing stuff like that repeatedly adds up to frequent issues.
- igouy 2y ago> I generally look at a given benchmark there Which? Just curious. Some-of the spectral-norm programs seem quite similar: https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/go-csharpaot.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- dartos 2y agoThe issue for me with languages like C# is the lack of expressiveness. Sometimes classes aren’t the abstraction I want to use. That’s why I like kotlin over Java or c#. It’s be nice to have a language like that which targets .net
- neonsunset 2y agoC# offers multiple options for abstracting away functionality. What do you have in mind? Also, JVM ecosystem does not offer the ability to provide zero-cost abstractions, which C# does with monomorphized generics. This is a hard requirement for productive systems programming if you don't want the C level of verbosity.
- dartos 2y ago> Also, JVM ecosystem does not offer the ability to provide zero-cost abstractions This is true, wasn’t thinking about that. C# always requires me to use and organize my code into classes and my data into objects. For example, If I wanted to use higher order functions, I need to wrap functions in callables (Objects). If I wanted to throw together a quick script to test, I need to set up a program which uses some magic configurations so that I don’t need that entry point class. Granted I only worked with C# professionally for a couple of years before getting back to a Go shop, but it always felt like trying to avoid thinking in objects was fighting against the language. Personally, I like just having first class functions which take simple data structures as arguments. Modeling the world as objects just isn’t as clear to me (the old OOP vs FP discussions) Languages like C# and Java turn me off for that reason.
- prmph 2y agoExactly. I used C# for a long time, and when I started using JS, I marveled at the directness of its expressiveness, its lack of ceremony. What's actually needed is a language as direct as JS, with the bad parts stripped out, types and a proper standard lib added, and compiled to byte-code for performance. They can call it a different name if they want.