Hacker News new | past | comments | ask | show | jobs | submit login
.NET 8 will be shiping with Tensor support (System.Numerics.Tensors...) (github.com/dotnet)
40 points by pjmlp 8 months ago | hide | past | favorite | 19 comments



Lots of good stuff coming in .NET 8 and C# 12

    - Primary constructors to simplify class declarations
    - Collection expressions to simplify initialization and make it more like JS/TS
    - Finally ahead-of-time (AOT) compile support for Web APIs which should improve cold starts for microservices
    - Lots of performance improvements
    - EF Core still possibly the best ORM out there; super productive.  Now with better JSON column type support.
C# and .NET is probably the stack that most teams should evaluate first when moving on from TypeScript and Node.


EFCore 8 is now able to do custom queries into on-demand types without views. This means you can drop to manually optimized queries at any time!


EFCore is the sexiest ORM out there. Makes Prisma look like a toy. Too bad it doesn't get the hype that it deserves.


As an EF expert, I don't have EF in my projects and use Dapper.


I felt the same way about Dapper until I figured out how EF makes sense in my workflow.

Way better experience with it now.


The new collection syntax is succinct and aesthetically pleasing but a step back in terms of functionality and information conveyance. The new syntax should have been introduced but reserved only for allocation-free (heap, that is) expressions where the result is a Span and kept the explicit new() requirement for any dynamic heap allocations.

As it is currently, the new collection syntax may result in dynamic heap allocations or it may not - it’s fully opaque.


To be fair, I think most devs aren't thinking about heap allocations; probably just want a collection.

If one needs to initialize it with performance considerations in mind, it is still possible to do so.


C# devs are a bit less allocation-blind than in some other ecosystems due to the from-the-beginning distinction between value and object types, the availability of manual stack allocation, and a general awareness of the pathological behavior of some dev-friendly but performance-deadly LINQ expressions. The recent introduction and heavy focus on Span and Memory<T>, source generators, etc have also done much to raise awareness of dynamic allocations and runtime overhead. It’s in light of this that I view choosing to paper over allocations a misguided effort.


Speaking of LINQ, depending on your use case, I suggest re-evaluating the intuition regarding its performance in specific scenarios. Both .NET 7 and especially .NET 8 have seen a lot of work to improve the underlying performance of LINQ and thanks to DynamicPGO certain patterns that used to be very unfriendly to performance now have (sometimes significantly) lower cost. The speed-up depends on the use case but expect to see anything from 10% up to >200-400% improvement.


Hopefully we never have to use Python again after this and it goes the way of PHP. The only thing Python really has is ML/AI/stats.


I still think Python is Lisp's revenge, after the way it went on AI Winter.

Everyone could be using a real powerful language, with JIT and AOT compilers, used to write full graphical workstations, instead they have to put up with writing bindings to C, C++, Fortran libraries.

However I still hope they get pressure enough to become more serious regarding JIT adoption in CPython.


> I still think Python is Lisp's revenge, after the way it went on AI Winter.

What do you mean?


https://wiki.c2.com/?AiWinter

Python became the language of the current AI wave, only with worse performance and tooling.


Sorry, but what happened to PHP?


nothing, just continues to be shit refuses to die


If .net had gone truly multiplatform earlier, it would have been a much bigger success.


There was Rotor, BSD licensed, and Mono (that now belongs to Microsoft as well, after Xamarin's acquisition).

Ironically after all of this, Miguel de Icaza is nowadays focused on Swift.


The separate ML.NET project has never seen much traction or adoption. Perhaps this will succeed by making it possible to port existing ML frameworks or models instead.


I wonder if this will be welcomed by the community over a couple next years, but if it’s just another PR stunt for a PM or PO like ML.NET, I doubt this is a good idea to include it in .NET proper.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: