Skip to main content
Version: 0.1

Design decisions (ADRs)

This is a curated reference index of the Architecture Decision Records in the repository. ADRs explain design intent and tradeoffs; they are not the normative language specification. Each link points to the source ADR on GitHub.

Null model, values, and primitives

ADRTitleSummary
0001Absence / null model — Kotlin-style nullable typesUses explicit nullable T?, nil, safe access, and assertion instead of a universal null.
0008Variable bindings — keep Go's var/const/:=, add letKeeps familiar Go declarations while adding immutable let.
0015Multi-target assignment evaluation orderEvaluates all right-hand values before observable writes, matching Go swap semantics.
0016Slice backing storage — T[]Represents slices with CLR single-dimensional zero-based arrays.
0044Complete numeric primitive coverageDefines full width-bearing numeric primitive coverage and conversion behavior.
0045object as the universal upper boundMakes object the top type for assignment compatibility, boxing, and object equality.
0046'c' character literal grammarSpecifies character literal grammar, escapes, static type, and diagnostics.
0049Width-bearing integer keyword namesChooses explicit names such as int32 and uint64 over ambiguous aliases.

Concurrency, async, and resource scope

ADRTitleSummary
0002Concurrency model — Go surface, .NET runtime, Kotlin scopesCombines Go-like go/channel syntax with .NET tasks and structured scopes.
0022go / chan / select → .NET loweringDefines how goroutine-like calls, channels, send/receive, and select lower to .NET.
0023async func / await — state-machine strategyCommits to compiler-generated async state machines for emitted async functions.
0030defer and block-scoped cleanup convergenceMakes cleanup block-scoped and aligns defer with using/finally lowering.
0040sequence[T] type alias and yield statementIntroduces sequence types and iterator yield statements.
0041sequence[T] in an async context aliases IAsyncEnumerable[T]Explores async sequence feasibility and binding shape.
0042async sequence[T] as a type-clause spelling for IAsyncEnumerable[T]Chooses an explicit type-clause spelling for async streams.
0043async func(P) R as a type-clause spelling for func(P) Task[R]Defines async function type clauses as task-returning function types.

Object model, OO, and data types

ADRTitleSummary
0003OO surface — data-oriented core with light OO escape hatchAdds classes/interfaces without making OO the center of the language.
0017Method virtuality — sealed by default, opt-in with openRequires explicit open for inheritable classes and overridable methods.
0018Interface default methods — not in Phase 3Defers default interface methods from the early interface surface.
0024Methods with receivers vs. extension functions canonical styleEstablishes receiver functions as the canonical extension/method style.
0025record keyword alias for data structMakes record syntactic sugar for data struct.
0029data struct synthesized membersDefines synthesized equality, copy, and ergonomic members for data structs.
0032Data-struct ergonomics polishRefines copying, deconstruction, and update syntax for data structs.
0033Inline value classes / inline structIntroduces single-field inline structs for value-class ergonomics.
0051Property declarations — prop keyword with accessor bodiesSpecifies property syntax, auto-properties, and accessors.
0052Event declarations on user types — event keywordDefines field-like and custom event declarations on user types.
0053Static members on user types — shared blockAdds static fields, methods, properties, and events through a shared block.

Generics and functions

ADRTitleSummary
0004Generics — consumption and definition in a single phase, with constraintsDefines initial generic types/functions, constraints, and type-erased implementation tradeoffs.
0020Generic type-parameter brackets — Go-style [T]Chooses square brackets for type parameters and type arguments.
0021Generic variance modifiers — in / out on interface type parametersAdds variance markers for interface type parameters.
0038Type-argument inference for imported open generic methodsDefines inference for imported generic method calls and associated emit fixes.
0050-> arrow trailing-lambda syntaxProposed shorthand for trailing lambdas; not part of the current implemented grammar.

Error handling and control flow

ADRTitleSummary
0005Error handling — exceptions only, uncheckedUses CLR exceptions instead of checked exceptions or Go-style error returns.
0009switch semantics — expression + statement, patterns, exhaustiveDefines switch statements, switch expressions, patterns, and exhaustiveness.
0013Drop Go's fallthroughReserves fallthrough but rejects it; cases never fall through.
0031Canonical for x in collectionEstablishes for x in collection as the preferred range iteration spelling.

Syntax, naming, and documentation policy

ADRTitleSummary
0006Visibility — explicit modifiers, public defaultReplaces Go capitalization export rules with explicit visibility modifiers.
0007String interpolation syntax — Kotlin-styleChooses $name and ${expr} interpolation forms.
0010Aspirational samples policy — rewrite to today's subset, re-expand per phaseKeeps samples aligned with implemented language phases.
0011String interpolation grammar and loweringSpecifies interpolation parsing and lowering details.
0012Raw string delimiter — backtickChooses backtick-delimited raw strings.
0014Visibility defaults — public for top-level declarationsMakes unmodified top-level declarations public by default.
0054Postfix member/index access on primary expressionsChains ./?./[] after any primary except a bare numeric literal ((42).Member).
0055String interpolation revampDelimiter-aware multiline holes, alignment/format clauses, late context-driven lowering (DefaultInterpolatedStringHandler/FormattableString), and full IDE support inside holes.
0057Documentation commentsMarkdown-authored /// documentation comments with lossless CLR XML-doc round-trip; hover renders the merged XML on imported APIs. Diagnostics GS0227GS0231.
0062Generalized ternary expressionPromotes cond ? a : b from the narrow ADR-0061 ref form to a normal expression; retires GS0259 in value contexts and adds GS0263.

CLR interop

ADRTitleSummary
0019Extension function declaration syntax — func (Receiver) Name(...) ...Defines receiver-based extension function syntax.
0026Operator-by-name on user types — deferredDefers user operator naming until a later design is chosen.
0034Imported CLR interop — static members, writes, operators, conversions, overload resolutionExtends imported CLR support across static members, writes, operators, conversions, and overloads.
0035User-defined operator keyword on GSharp typesAdds receiver-style operator declarations for G# types.
0036CLR event subscription with += / -=Uses assignment-like syntax for CLR event add/remove.
0037Numeric better-conversion target tie-breaking in overload resolutionDefines numeric conversion ranking for overload resolution.
0039By-ref pointers and CLR interop for ref / out / in parametersIntroduces *T, &, dereference, ref arguments, and related diagnostics.
0047Attribute consumption and declaration (Kotlin-style annotations)Defines @ annotation syntax, use-site targets, attribute arguments, and @Attribute sugar.
0056Span consumption v1 — ref-returning members, span element access, closed generic value-type fieldsAuto-dereferences ref-returning members in rvalue position, makes spans indexable (read/write), applies []T → Span[T] conversion in argument position, and gives closed generic value-type fields real layout.
0058Ref-safe-to-escape and the scoped modifierAdds the scoped parameter modifier and the supporting GS9004/GS9006 ref-pointer escape diagnostics.
0059Named delegate typestype Name = delegate func(...) declares a real CLR MulticastDelegate-derived type; diagnostics GS0233GS0234.
0060ref/out/in parametersDeclaration-site and call-site ref-kind modifiers with diagnostics GS0235GS0243; ref-aliasing locals (let ref/var ref) and ref returns are follow-ups (GS0248GS0258).
0061Conditional ref-argumentsNarrow ref cond ? a : b form inside ref-kind argument payloads; diagnostics GS0259GS0262.
0063Method overloading and optional parametersLifts the v0 "one declaration per name" rule and adds default parameter values; diagnostics GS0264GS0267.

Emit and tooling

ADRTitleSummary
0027Roslyn-fork decision for v1.0 — stay on the bespoke emitterKeeps the direct metadata emitter instead of adopting a Roslyn fork for v1.0.
0028Multi-package emit model — Option B, C#-faithfulDefines how multiple packages map to emitted CLR namespaces/types.
0048Portable PDB emitAdds portable PDB, source mapping, and debug-symbol policy to the emitter.