News for hackers. Stuff that matters.
Re:.NET 6 is now in Ubuntu 22.04 by synergy20 on Tuesday August 16, 2022 @01:09PM (#32485747)
A fully devoted Linux developer here that never touched Windows' ecosystem(.NET, Visual C++, win32 api, all those), any reason for me to jump on .NET? where does this runtime run(x86/windows, now linux, what about MacOS, and embedded systems), and what's the selling point(web framework in c++ like language? a better c++/java?)

https://learnxinyminutes.com/docs/csharp/

it looks more like Java than c++ to me.

On a different note, I will state this again: I think microsoft will acquire Canonical one day.

Re:.NET 6 is now in Ubuntu 22.04 by sedatk on Tuesday August 16, 2022 @02:18PM (#32486647)
I think C#/.NET has more performance-oriented affordances than Java:

- It supports structs, and unboxable structs called "ref structs". They let you to avoid GC/heap-alloc for small data structures with clear ownership semantics.

- It uses type reification for generics instead of type erasure. Combined with value-types, this can produce very optimized code. The downside is larger binary sizes.

- It allows unsafe programming with pointer arithmetic where performance is truly critical. This is where C# is closer to C/C++ than Java.

- Supports native compilation to a target architecture. This lets you avoid JIT overhead and lets you ship self-contained binaries (like Go).

- .NET supports source generators which can let you keep maintainable code and generate an optimized one.

Performance aside, C# is a very pleasant language to use, and .NET is a delightful runtime. I'd say give it a try and see it for yourself.

Re:.NET 6 is now in Ubuntu 22.04 by stetrain on Tuesday August 16, 2022 @01:16PM (#32485846)
It runs on Windows, Mac, and Linux x86/x64/Arm64

The main target is enterprise software systems and web backends. Asp.Net is a very mature framework for Web APIs and MVC applications.

Entity Framework is a decent ORM solution supporting several popular DBs with tools for code generation and migrations, and LINQ is a complementary query language that is useful for in-memory collection operations as well as db queries.

And I think the largest value is in the NuGet software library ecosystem, things like MassTransit for service bus and queue communication and many many others.

It’s a well-supported ecosystem of first party and third party software with a lot of modern features, but definitely still in the realm of managed runtimes so not a competitor to C, Rust, etc.

Re:.NET 6 is now in Ubuntu 22.04 by phwak on Tuesday August 16, 2022 @01:39PM (#32486142)
> Asp.Net is a very mature framework for Web APIs and MVC applications.

*ASP.NET Core

Re:.NET 6 is now in Ubuntu 22.04 by stetrain on Tuesday August 16, 2022 @02:19PM (#32486664)
True, the non-Core versions really aren’t worth considering for a new dev entering the ecosystem, and MS has made it clear that .NET Core is .NET going forward.
Re:.NET 6 is now in Ubuntu 22.04 by WorldMaker on Tuesday August 16, 2022 @04:14PM (#32488218)
ASP.NET is rumored to drop the "Core" name somewhere in major version 7/8/9, just as .NET dropped "Core" in .NET 5, which is a higher version number than both sides of the fork. There was briefly an ASP.NET 6 (technically, the baroque "ASP.NET 5 MVC 6"). There's never yet been a version higher than that. I think part of the hold up there were some builds of the old Entity Framework made to version 8 or 9, and ASP.NET is not likely to drop "Core" until EF Core is able to drop "Core"?
Re:.NET 6 is now in Ubuntu 22.04 by metaltyphoon on Wednesday August 17, 2022 @01:56AM (#32492816)
EF Core is dropping Core on version 7, so November.
Re:.NET 6 is now in Ubuntu 22.04 by Tao3300 on Tuesday August 16, 2022 @01:17PM (#32485858)
I've spent most of my career in Java and there are certainly some things that C# (I know, somewhat tangential to .NET at this point, but still relevant) does better. E.g. if I want to use declarative style to describe something I want out of a data structure, I'd much rather use LINQ than Streams.
Re:.NET 6 is now in Ubuntu 22.04 by int_19h on Tuesday August 16, 2022 @08:31PM (#32490875)
It's broadly in the same ballpark as Java, but with more language features (e.g. sequence comprehensions, pattern matching), and it offers some low-level features like raw pointers and spans for when you want performance or interop with C.
Re:.NET 6 is now in Ubuntu 22.04 by password4321 on Tuesday August 16, 2022 @01:49PM (#32486290)
I don't think it offers anything compelling for cross-platform web/network services that Go does not.

Microsoft relies on "fire and motion"¹ to sell to developers, and typically reimplements instead of working with open source projects.

Recent example: only Visual Studio 2022 supports .NET 6, time to upgrade.

¹ https://www.joelonsoftware.com/2002/01/06/fire-and-motion

Re:.NET 6 is now in Ubuntu 22.04 by stetrain on Tuesday August 16, 2022 @05:09PM (#32488963)
Or you can use VSCode, Rider, or your text editor of choice plus the cli tools.