6 ms·
> A few fumbles by Microsoft early on stunted its growth Microsoft really, _really_ missed out on a huge opportunity to rebrand .NET into something else when t
by brtkdotse 2y ago
> A few fumbles by Microsoft early on stunted its growth
Microsoft really, _really_ missed out on a huge opportunity to rebrand .NET into something else when they did the Framework -> Core transition. Despite .NET being cross platform for over ten years and winning benchmarks left and right people still see it a the “slow enterprisey framework that only runs on Windows”.
- CharlieDigital 2y agoYes, big time fumble. I've met a handful of folks who used it in the .NET Framework days and hadn't kept up with the changes in Core (multi-platform, object-functional hybrid, minimal syntax for console and APIs, etc.).
- ngrilly 2y agoWhat do you mean by "minimal syntax for console and APIs"?
- metaltyphoon 2y agoProbably top level statements and minimal APIs from ASP.Net Core
- CharlieDigital 2y agoMinimal web APIs are structured a lot like Express (whereas .NET web APIs are more like Nest.js) https://learn.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis?view=aspnetcore-8.0 https://learn.microsoft.com/en-us/aspnet/core/fundamentals/m...
- ngrilly 2y agoHaving recently joined a company using C#, and with a background using Go, Python, Node, and similar, I was worried about heavy "enterprise-style" APIs. I was happy to discover the new minimal web API while reading .NET Core documentation.
- jodrellblank 2y agoYou no longer need imports, or namespace, class and main method boilerplate to write a basic C# program; there’s now a way to simply write some lines of code in a file with some implicit imports, and compile/run them like it was more of a scripting language. https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/top-level-statements https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/to... (If there’s other syntax changes, I don’t know them, AFAIK it’s the same C# you write)
- SideburnsOfDoom 2y ago> If there’s other syntax changes, I don’t know them The new syntaxes that come to my mind are: * File-scoped namespaces * "global using" * "using static"
- SideburnsOfDoom 2y ago> What do you mean by "minimal syntax It's a beginner friendly and "demo mode" set of features to reduce boilerplate for small programs, such that the minimal "hello world" program is literally 1 line of code. And a working minimal ASP web app with a http endpoint is not much longer. C# and .NET was from day 1 designed for "programming in the large" so that large codebases can be sensibly organised. This however causes some overhead, such that a person coming from Python might have looked at the standard C# "hello world" example with using statements, namespace, class and method wrapping the 1-line payload, and conclude that the language is impossibly clunky and cumbersome. My opinion is the opposite; managing e.g. 50K lines of code without those ways of organising code, is going to be impossibly clunky and cumbersome. However, it is also true that demo mode is great for 1-file demos that get right to the point.
- ngrilly 2y agoI think the using statements are fine, even for one-file demos. Python, Go and Node don't have implicit imports like C# and it's fine. I'm actually not entirely sold on the implicitness. Forces the reader to look at the .csproj file and the target framework documentation what is implicitly imported. Most of the verbosity comes from classes and namespaces. Go and Rust have shown it's possible to design a language for "programming in the large" without classes for everything and with less verbose namespaces. But to be fair, I'm just getting started with C# so my comment above is likely wrong and biased. Happy to be proven wrong :)
- CharlieDigital 2y agoC# has several constructs like anonymous types, tuples, named tuples, and records (for structs and classes). Each has different use cases (and sometimes limited scopes like anonymous types) that can serve different contexts for data modelling. > with less verbose namespaces This is, once again, the function of the team and not the language. There is no hard mandate on how namespaces are selected so verbose namespaces is a result of teams preferring it over more concise naming. Part of that might be purely practical. Whereas in JS, you would import a local module by path, C# imports via namespace and convention is to use pathing, but C# will of course allow any namespace convention you like for local modules and does not constrain to strict pathing.
- Modified3019 2y agoYep, I literally only learned it was cross platform last year when I noticed it as a package dependency. Mind you, I’m not a coder, and more just a Linux homelab hobbyist.
- sundarurfriend 2y agoI was going to ask what the multiplatform deployment story was like, it seems like you've partially answered it - it seems like you ship it with .NET Core as a dependency, kinda like JRE for Java programs? How heavy of a dependency is it? And is there a dependency hell situation, if different programs require different versions of .NET Core?
- int_19h 2y agoThere are quite a few knobs there. You can AOT-compile the bytecode, as well, and you can ship the whole thing as a single binary: https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file/overview https://learn.microsoft.com/en-us/dotnet/core/deploying/sing... Size very much depends on what you actually use in the app, but on the order of tens of megabytes.
- ethbr1 2y agoAlso, one of the major changes in the Framework -> Core (now just .NET) shift was making it legally permissible to redistribute the runtime? So you can ship .NET code with a .NET runtime all in your installer. Afaik, Framework was only distributable from Microsoft.
- telgareith 2y agoNope, have always been able to ship the redist installers. Just like VC++. https://www.microsoft.com/en-us/download/details.aspx?id=21 https://www.microsoft.com/en-us/download/details.aspx?id=21 (scroll down to 'Installation Instructions') After all, not being able to ship the runtime with the software to buyers would have been... Bad. In the early '00s
- tbrownaw 2y ago> Despite .NET being cross platform for over ten years and winning benchmarks left and right people still see it a the “slow enterprisey framework that only runs on Windows”. Do these people I've never heard of outnumber the people who did upgrade but wouldn't have if it had been branded as a separate product?
- ngruhn 2y agoI’m definitely one of these people. Maybe I should give .NET a chance.
- CharlieDigital 2y agoIt's quite nice now. Tooling is way nicer than it was 10 years ago. My team is all Apple silicon Macs and we deploy to AWS Arm64 instances. Unit tests in GH run on Linux workers.
- monkaiju 2y agoI encountered this within the last week...
- Kinrany 2y agoLess than 50% of software engineers ever used .NET for anything, so the answer is almost certainly yes?