7 ms·
I've been writing C, C++, C# and some js/sql/ts/python for money. Lua for lulz. And *nothing* gets even fucking close in terms of productivity to C#. Great la
by tester756 2y ago
I've been writing C, C++, C# and some js/sql/ts/python for money. Lua for lulz.
And *nothing* gets even fucking close in terms of productivity to C#.
Great language, mature and robust ecosystem with sane compilation times and
great tooling: package manager, test runner, strong debugger, one CLI with almost all tools needed.
I wish C++ was half as enjoyable as C# is.
- TillE 2y agoI'm a big fan of C#, but to be fair nothing else you've named is really aiming for the same niche. The better comparison would be Swift, Go, Java/Kotlin, stuff like that. But yeah I think C# is often unfairly viewed as a boring enterprise-y language when it's actually become a very comfy swiss army knife.
- LtWorf 2y agoIf it wasn't so linux distribution unfriendly…
- nickcox 2y agoIn what ways?
- LtWorf 2y agoBasically it's not included in any distribution. Mostly for license problems. Which means anything you write with it can't be included in any distribution. It's quite limiting. Basically it's only useful for proprietary software shipped by 3rd party.
- neonsunset 2y agoThe entirety of https://github.com/dotnet/dotnet https://github.com/dotnet/dotnet (which is a VMR for full-source build of Roslyn, runtime and everything else that goes into runtime-only and SDK packages) is MIT, which is as permissive as it gets, save for CC0 or Unlicense. Quick search shows that SDK and runtime packages are available in the official feeds for Archlinux: https://archlinux.org/packages/?sort=&q=dotnet https://archlinux.org/packages/?sort=&q=dotnet Fedora: https://packages.fedoraproject.org/pkgs/dotnet8.0/ https://packages.fedoraproject.org/pkgs/dotnet8.0/ Ubuntu: https://pkgs.org/search/?q=dotnet https://pkgs.org/search/?q=dotnet I always wondered what is the motivation behind the negative comments like these on .NET submissions. Is this because .NET is mostly made by MS employees instead of Google (which is an AdTech company) or Oracle (which has a license trap JDK distribution)?
- LtWorf 2y ago> I always wondered what is the motivation This is the motivation ↓ apt install dotnet-sdk-8.0 Error: Unable to locate package dotnet-sdk-8.0 Error: Couldn't find any package by glob 'dotnet-sdk-8.0'
- neonsunset 2y agoA lot of otherwise excellent software is not present in, for example, official Debian feeds. As a sibling comment pointed out, that’s no reason to throw a tantrum and is a trivially solvable issue.
- LtWorf 2y agoLol trivially… unless you want to distribute your software that is.
- neonsunset 2y agoYou can make a single file executable that does not require any dependencies with just the following. No runtime is required on the host, which I assume you allude to as lacking necessary package in the official feed might cause issues if it's required (and given it's present in everything that is not Debian, it is a Debian issue and something Debian must address). JIT: dotnet publish -p:PublishSingleFile=true -p:PublishTrimmed=true AOT: dotnet publish -p:PublishAot=true -p:OptimizationPreference=Speed* Use -o to specify destination. By default targets the host's OS RID, but can be overriden with e.g. `-r linux-musl-arm64`. Cross-architecture compilation is supported within OS, and there is a nuget package that switches the publish to Zig toolchain to allow publishing for Linux under Windows without relying on WSL2: https://www.nuget.org/packages/PublishAotCross https://www.nuget.org/packages/PublishAotCross This only concerns AOT as .NET uses the same linker to produce the final binary as your regular C/C++ code. It is a true native executable through and through that is understood by all standard tooling like native code profilers. For JIT binaries, anything that .NET supports can be published for under any other OS and ISA. * my recommendation as the size impact is negligible but codegen quality in edge cases improves quite a bit. Other flags that may be useful are -p:IlcInstructionSet=x86-x64-v3 (AVX2 and friends) and -p:IlcFoldIdenticalMethodBodies=true (it's disabled by default because it can mess up stack traces, naturally, in .NET 9, disabling stack trace information enables it as well).
- abcde777666 2y agoI've found it quite easy to build and deploy to Linux, also curious what challenges you've run into.
- LtWorf 2y agoIf it can't be included in the distribution, it's not "distribution friendly"
- mlhpdx 2y agoAlmost everything I build in C# runs on some flavor of Linux.
- LtWorf 2y agoI said nothing about running. I said about distributions.
- latentsea 2y agoWhat distributions specifically have you had a problem developing on? I've developed on Ubuntu and Pop_OS! in C# for years and never hit a problem.
- LtWorf 2y agoCan I apt-get install your software? If not, then you've just hit the problem.
- metaltyphoon 2y agoOh yeah so unfriendly. sudo dnf install dotnet-sdk-8.0. sudo apt install dotnet-sdk-8.0 sudo apk add dotnet-sdk-8.0
- LtWorf 2y agoapt install dotnet-sdk-8.0 Building dependency tree... 0% Error: Unable to locate package dotnet-sdk-8.0 Error: Couldn't find any package by glob 'dotnet-sdk-8.0' Works like a charm. Any more irrelevant things to say?
- metaltyphoon 2y agoAll this means is Pop OS doesn’t have it published. You don’t have to throw a piss because MS doesn’t publish it for Pop https://github.com/dotnet/core/blob/main/linux.md#packages https://github.com/dotnet/core/blob/main/linux.md#packages
- LtWorf 2y agoI use regular proper debian. The fact that it's not there (and it can't be there) was exactly my point. I use toilets normally. I don't throw excrements.
- tester756 2y agoI have no idea why he gave you some random link literally first link under "dotnet debian" is: https://learn.microsoft.com/en-us/dotnet/core/install/linux-debian#debian-12 https://learn.microsoft.com/en-us/dotnet/core/install/linux-... __________ wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb https://packages.microsoft.com/config/debian/12/packages-mic... -O packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb rm packages-microsoft-prod.deb sudo apt-get update && sudo apt-get install -y dotnet-sdk-8.0
- LtWorf 2y ago
- darby_nine 2y ago> And nothing gets even fucking close in terms of productivity to C#. C# gets compared to java a lot for a good reason, and yet the languages and ecosystems have since diverged in their priorities and abilities. This gets even more complicated when considering F# and Scala. Do you think Java would offer similar productivity, or are there aspects to the C# that are—in your personal experience—uniquely productive?
- deleted 2y ago[deleted]
- sanex 2y agoI wrote c# professionally for 8 years and now have switched to a codebase mostly in Java and some kotlin. I know some of this is learning curve but none of those things mentioned are anywhere close in JVM. Build systems, package management, close IDE integration for test runners, builds, etc. The ability for the IDE to even know what version of Java you want the project to run in even though it's defined in the project doesn't exist. Kotlin as a language does some nice things but even the syntax highlighting is better with c#. Async is trivial in c#. The orm makes it so you can write db queries in c# with Linq and not have to mess with SQL. SQL injection isn't even a thing I ever had to think about but now I have to write actual SQL inline with my code to do any sort of non trivial queries. Were using maven which is apparently older than gradle so maybe that is better but having to remember do clean then compile before any type of build required action has caught me with so many things. Like migrations or tests including non existent files. There are more things that drive me crazy but this post will get unreadable and it's ranty enough as is.
- vips7L 2y agoThis is definitely all just a learning curve on how to do this. None of this is accurate at all. - IntelliJ knows exactly what version of Java you want to run and develop against. - Async is also trivial. Just fire off a virtual thread. - it sounds like your company just picked a bad orm. Any good one is going to escape sql injection when binding variables. You are using binding right? If you to “write it in Java” there is also jOOQ. The one thing I do think C# is far superior at is packaging and distribution. It’s beyond simple to package a C# application into stand alone binary, whether is be AOT or JIT.
- Salgat 2y agoThe standard library alone is insane. The only time I need an outside library is for something specific like a database or sdk.
- Buttons840 2y agoI'm a Linux user who prefers open-source tools. I not a fan of Microsoft's programs, tools, editors, etc. What would you suggest I do to be productive with C#?
- ninjis 2y agoJetBrains Rider
- freedomben 2y agoIt's remarkably disappointing to see this question downvoted. I had the same thought, but this makes me wonder if it's just a bad culture fit from the start. I've been Linux-only now for 15 years and haven't used an IDE in well over 10. I use vim (neovim now) exclusively. Given my characteristics, should I just squash my curiosity and do a pass on C#? Do C# people not see value in open source? Is there low tolerance in that community for people who have those values?
- misswaterfairy 2y agoStrong advocate of open source here. That said, in an enterprise setting, for all of Microsoft's other faults, C# is damn near bullet proof. Some enterprises, like mine, can't rely on community supported tooling for life-critical systems. If something breaks, we're near instantaneously on the phone to a dedicated support rep to fix the problem. I learned C# and Java years ago during my IT degree but had long since forgotten them. The enterprise I work in uses C# a fair bit. Only started to pick up C# again in the past few months, and holy heck, I forgot how pleasurable it is to work in C# again. If the third-party components used in some software I help maintain supported JetBrains Rider, I'd use it in a heartbeat. Visual Studio (not Code...) is okay, though I'm not tripping over myself to use it. PyCharm and IntelliJ have spoiled me.
- JamesBarney 2y agoThe reason c# has such a weak open source system is two fold. Supply and demand. From a supply stand point source enthusiasts have historically hated Microsoft. From a demand standpoint everyone uses the Microsoft variant because it's easy to use and hire for. There's a ton of documentation. Lots of issues are at the seems of different libraries, applications or frameworks you use. And in the Microsoft world it's frequently all the same. Everyone uses the same identity library, the same webserver, the same cloud, the same database, the same orm. If you're into learning technology it's not for you. But if you're into learning about domains and business instead of tech or like having free time it's a great stack. Doesn't work well for b2c because of the cost, but works really well for b2b.
- lmm 2y agoTypescript is pretty competitive with C# on those factors in my experience. What do you find yourself missing there?
- qingcharles 2y agoI've programmed damn-near everything at some point, with a long period of x86 assembler plus C++. Really unpopular opinion: VB.NET was the most enjoyable, most readable language I ever programmed in. I've only begrudgingly moved to C# over the last few years as my primary since MS has pretty much killed VB.
- falcrist 2y agoThere aren't many Microsoft products that seem to be genuinely good without many complications or drawbacks. Most of those products have the words "Visual" and "Studio" in the name. Atmel Studio can come too.