Skip to content
Global sound
.NET in pillole

.NET in pillole

357 - C# 15 e Union Types: finalmente servono davvero?

· 26 min

Show notes

In C# abbiamo sempre avuto diversi modi per rappresentare un valore che può assumere forme differenti: gerarchie di classi, record, enum, Result pattern o librerie dedicate.

Con C# 15 arrivano le Union Types, ma la domanda è: ci servivano davvero?

In questa puntata parto da alcuni casi concreti per capire cosa semplificano, come si integrano con pattern matching e ASP.NET Core e, soprattutto, quando possono migliorare davvero leggibilità e manutenzione del codice… e quando invece rischiano solamente di complicarlo.

• https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-15
• https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/union
• https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/tutorials/unions
#dotnet #csharp #csharp15 #dotnet11 #uniontypes #discriminatedunions #aspnetcore #minimalapi #softwaredevelopment #programming #developers #dotnetdeveloper #coding #softwarearchitecture #dotnetinpillole

Website: spreaker.com

Live, last hour: 7,766 songs on 3,390 stations in 130 countries

Discover the world through radio

More ways to discover (9)

Heard something good? Save it, or open it straight away in Spotify.

★ Artist of the week The fastest riser on the radio this week
Your song here? From € 9 per week →
JOY512Continue listening