Spike: model Option, Either and Result on C# unions and closed hierarchies
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Read the issue's measurements and compatibility checklist, then inspect the current Option<T> struct and its tests alongside the trait prototype branch for #862. Build a time-boxed prototype on that branch and compare allocations, pattern matching, public surface, compatibility, and dependent issues with today's struct; document the results here and recommend whether 4.0.0 should adopt the union shape.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Time-boxed prototype that decides the shape of the 4.0.0 type redesign. Decided at the 4.0.0 grooming on 29 Oct 2026; part of the umbrella issue for the Closed Hierarchy Update.
Question
What do Option<T>, Either<L, R> and Result<T> become on .NET 11 / C# 15, now that the language has union types and closed hierarchies?
Deliverable
One branch (not for merging) that implements Option<T> in the candidate shape, plus Either or Result if the shape raises questions a single type cannot answer. A write-up on this issue that compares it with today's struct, measured on:
- Allocations and size: does the union shape stay allocation-free, what is
sizeof, does it still fit in a register pair. - Pattern matching: exhaustiveness in
switchexpressions, whether[var value]list patterns andis Somestyle checks survive, what the error message looks like for a missing case. - Public surface: what happens to the implicit conversion from
T,Option<T>.None, theMatch/Select/SelectManymembers, and the JSON converter and xunit serializer. - Binary and source compatibility: which 3.8.0 call sites break, so the upgrade chapter can list them.
- Dependents: what the shape means for the issues that wait on it: #809 (constructors), #760 (collection expressions), #868 (
UpCast/DownCastextensions), #864 (Taskas a monad), #802 (Validation applicative).
Time box
One week of effort. If the union shape is not clearly better than the current struct on the measurements above, 4.0.0 keeps the structs and the "closed hierarchy" is expressed only where it is free (e.g. closed on the union-like hierarchies the generator used to produce, exhaustiveness via the analyzer).
Runs on the same branch as the trait prototype of #862, because both answer the interface-and-boxing question.
- Lingua principale
- C#
- Stelle
- 55
- Fork
- 6
- Merge medio
- 23h 51m
- PR unite (30g)
- 89
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di polyadic/funcky
-
Assertion failure label must become Assert.X() when FunctionalAssert is removedForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
blocked
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
polyadic/funcky#868 · 6 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
docs
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
I maintainer di solito rispondono entro 1 giorno
-
docs
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement to discuss
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di polyadic/funcky
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug elsa 3 prio low
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
elsa-workflows/elsa-core#9154 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NethermindEth/nethermind#15452 ·
I maintainer di solito rispondono entro 1 giorno
-
kind:ux size:S
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
elsa-workflows/elsa-foundation#3563 ·
I maintainer di solito rispondono entro 1 giorno
-
请让 FPS 叠加层的字号大小可单独设置Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno