Skip to main content
Version: 0.1

Feature matrix

This matrix summarizes feature support in the compiler emit path (gsc) and the interpreter/REPL path. Legend: Supported means implemented on that path; Mostly supported means ordinary cases work with known edge limitations; Partial means syntax or binding exists but execution or emit is incomplete; Not supported means rejected or intentionally absent; N/A means the feature belongs to tooling rather than one execution path.

Lexical and source structure

FeatureEmit (gsc)InterpreterNotes
Lexing, parsing, keywords, tokens, literalsSupportedSupportedShared lexer and parser.
Packages, imports, import aliasesSupportedSupportedEmit supports multi-package assemblies; interpreter binds the same model.
Implicit System importSupportedSupportedEnabled by default; disabled with /noimplicitimports or /no-implicit-imports.
Top-level statements and func MainSupportedSupportedMixing top-level statements and explicit Main is diagnosed by GS0165/GS0166.
CommentsSupportedSupportedLine (//), block (/* … */), and Markdown documentation (///, ADR-0057) comments.
String, raw string, and interpolated string literalsSupportedSupportedSigil-free interpolation with $name/${expr,alignment:format}, delimiter-aware multiline holes, and DefaultInterpolatedStringHandler/FormattableString lowering (ADR-0055).
Character literalsSupportedSupportedCharacter diagnostics are GS0191 through GS0195.
Documentation commentsSupportedSupported/// Markdown comments round-trip to CLR XML doc; hover renders CLR XML docs for imported APIs. Diagnostics GS0227GS0231.

Types and values

FeatureEmit (gsc)InterpreterNotes
Primitive types and numeric operatorsSupportedMostly supportedEvaluator implements primitive arithmetic; address/deref unary operators are limited.
Width-bearing integer namesSupportedSupportedCanonical names are int32, uint64, and related widths; no built-in int alias.
Numeric conversionsSupportedSupportedADR-0044 widening lattice plus explicit conversions.
object universal upper boundSupportedSupportedBoxing and object equality are implemented.
Nullable T?, nil, !!, ?:, ?.SupportedSupported!! throws in the evaluator when the value is nil.
Arrays and slicesSupportedSupportedSlices are backed by arrays; append copies.
MapsSupportedSupportedBacked by Dictionary[K,V]; delete and len are implemented.
Tuples and multi-returnSupportedSupportedMulti-value return syntax is represented as tuple literals.
Struct literalsSupportedSupportedField initialization and field access are implemented.
Data structs, records, with/copySupportedSupportedrecord is an alias for data struct; data equality and ergonomics are implemented.
Inline structsSupportedSupportedExactly one field; participates in structural equality.
Classes and primary constructorsSupportedPartially supportedEvaluator supports G# classes; CLR base initializer modeling is limited.
Explicit class init constructorsSupportedSupportedG# class constructors are parsed, bound, and evaluated.
InterfacesSupportedSupported for checking/upcastsInterface method bodies are rejected; default interface methods are not implemented.
PropertiesSupportedSupportedAuto/computed and static/shared forms are represented.
EventsSupportedSupportedG# and CLR event subscription paths exist.
Static/shared membersSupportedSupportedDeclared in a shared { ... } block.
Function types, literals, closuresSupportedSupportedDelegate conversions are strongest on the emit path.
Generics and method inferenceSupportedSupported for binding/evaluationMetadata specs plus type-erased handling for open type-parameter-containing shapes.
Variance and constraintsSupported semanticallySupported semanticallyDiagnostics include GS0150 through GS0153.
By-ref and pointersPartialLimited/not supported& / * / *T for CLR ref/out/in interop (ADR-0039); ref returns auto-dereference in rvalue position (ADR-0056 §1). Evaluator rejects generic address/deref execution.
ref/out/in parametersSupportedSupportedDeclaration-site and call-site modifiers per ADR-0060; diagnostics GS0235GS0243. Includes out var/let/_ inline declarations.
Ref-aliasing locals (let ref / var ref)SupportedSupportedLocal whose IL slot is T& and aliases another lvalue. Diagnostics GS0256GS0258.
ref-returning functionsSupportedSupportedfunc f(...) ref T { ... } paired with return ref <lvalue>. Diagnostics GS0248GS0255.
scoped parameter modifierSupportedSupportedConstrains a ref struct / managed-pointer parameter from escaping; enforced by GS9004 / GS9006.
Spans and ref struct typesMostly supportedLimitedStack-only consumption of Span[T] / ReadOnlySpan[T] and user type X ref struct: element read/write, []T→span conversion, closed generic value-type fields (ADR-0056). Escape rules are GS0219; ReadOnlySpan[T] writes are GS0226. Full ref-safe-to-escape analysis is deferred (#376).

Declarations and members

FeatureEmit (gsc)InterpreterNotes
Top-level functions and variablesSupportedSupportedvar, let, const, and := are implemented.
Visibility modifiersSupportedSupportedpublic, internal, and private; invalid locations report GS0180.
Receiver methods and extension functionsSupportedSupportedG# receiver style and imported CLR extension dispatch.
Operator declarationsSupportedSupported where evaluator invokes user/CLR op pathsReceiver operator declarations map to CLR op_* names.
Interface implementationSupportedSupported for checks/upcastsMissing members and sealed-interface violations are diagnosed.
Inheritance and overridesSupportedPartially supportedBase classes must be open; override diagnostics are implemented.
Default parameter values in G# declarationsSupportedSupportedADR-0063. Optional parameters carry compile-time-constant defaults; rule violations report GS0265.
Method overloading (user functions)SupportedSupportedADR-0063. Functions can carry overload sets differing by parameter types or ref-kinds; duplicates report GS0264, ambiguous calls report GS0266, no-applicable reports GS0267.
Named delegate typesSupportedSupportedADR-0059. type X = delegate func(...) declares a real CLR MulticastDelegate-derived type; diagnostics GS0233GS0234.

Statements and control flow

FeatureEmit (gsc)InterpreterNotes
ifSupportedSupportedIncludes simple-statement form.
for condition, clause, infinite loopsSupportedSupportedThere is no while keyword.
for x in collection and for x := range collectionSupportedSupportedCanonical in form plus Go-style range form.
Ellipsis loopsSupportedSupportedfor i := start ... end.
break and continueSupportedSupportedInvalid locations are diagnosed.
Multi-assignment and deconstructionSupportedSupportedTarget/value mismatches are diagnosed.
switch statementsSupportedSupportedCases do not fall through.
Switch expressionsSupportedSupportedExhaustiveness and arm type diagnostics implemented.
PatternsSupportedSupportedConstant, relational, type, property, list, and discard patterns are represented.
fallthroughNot supportedNot supportedReserved and diagnosed as GS0168.
try, catch, finally, throwSupportedSupportedCLR exception model.
usingSupportedSupported if lowered/bound disposableResource-scope variable declaration.
deferSupported by binding/lowering intentSupported when lowered before evaluationBinder requires a call expression.
gotoPartialPartialToken and bound label/goto nodes exist; use with caution pending fuller docs.

Expressions

FeatureEmit (gsc)InterpreterNotes
Calls and generic callsSupportedSupportedBracketed type arguments.
Named argumentsSupportedSupportedFoo(timeout: 30, retries: 3) for free functions, user methods/constructors, extension functions, and inherited CLR methods (including delegate Invoke). Indirect calls through a function-typed variable and variadic targets are excluded. Diagnostics GS0244GS0247.
Conditional (?:) ternary expressionSupportedSupportedGeneralized in ADR-0062; cond ? a : b is a normal expression. GS0263 covers the "no common type" failure.
Conditional ref-arguments (ref cond ? a : b)SupportedSupportedADR-0061. Branches must produce same-typed lvalues. Diagnostics GS0260GS0262.
Struct, array, and map literalsSupportedSupportedMap literals bind to Dictionary[K,V] backing.
Indexing and index assignmentSupportedSupportedArrays, slices, maps, and imported CLR indexers.
Null-conditional accessSupportedSupported?. represented in the bound tree.
Type operatorsSupportedSupportedtypeof(...) and nameof(...).
Trailing func lambdasSupportedSupportedcall(...) func(...) { ... } form.
Arrow trailing lambdasNot supportedNot supportedADR-0050 is proposed; current parser uses -> for switch-expression arms.

Concurrency, async, and iterators

FeatureEmit (gsc)InterpreterNotes
goSupportedSupported with evaluator scheduling limitsOperand must be a call expression.
scope structured concurrencySupportedSupportedChild tasks are joined and failures propagate.
Channels, send, receive, closeSupportedSupportedBacked by System.Threading.Channels.
selectSupportedSupportedReceive, receive-bind, send, and default cases.
async func and awaitSupportedSupported by blockingEmit has state machines; evaluator blocks on awaiters.
Async state-machine edge casesPartialN/AUnsupported emit shapes report GS0190.
sequence[T] and yieldSupportedSupportedSync iterator state machines in emit; evaluator collects sequence values.
async sequence[T] and await forSupportedSupported by blockingMaps to IAsyncEnumerable[T].

CLR interop

FeatureEmit (gsc)InterpreterNotes
Imported constructorsSupportedSupported by reflectionIncludes simple-name construction when imported.
Imported instance/static methodsSupportedSupported by reflectionOverload resolution and conversions apply.
Imported fields/properties/indexersSupportedSupported by reflectionReads and writes are represented separately.
Imported eventsSupportedSupported+= and -= bind to event add/remove.
Imported extension methodsSupportedSupportedUses imported [Extension] classes.
Imported optional/default argumentsSupportedSupportedVerified by sample coverage.
Function literal to delegateSupportedPartialSome marshalling scenarios are emit-path only.
Method group to delegateSupportedSupported in covered scenariosIncludes imported CLR method groups.
Imported operator overloads and conversionsSupportedSupported where evaluator invokes pathsBound as CLR operator/conversion calls.
AttributesSupportedSemantically recognizedIncludes @Attribute sugar and @Obsolete; [DllImport] reports GS0211.
P/Invoke/externNot supportedNot supportedRecognized unsupported surface only.

Tooling and build

FeatureEmit (gsc)InterpreterNotes
PE assembly emitSupportedN/ADirect System.Reflection.Metadata emitter.
Portable PDB, Source Link, embedded sources, deterministic IDsSupportedN/AEmit-only debug information.
Reference assembliesSupportedN/ASDK can produce reference assemblies.
SDK .gsproj build/run/packSupportedN/AGsharp.NET.Sdk integrates with MSBuild and dotnet.
REPLN/ASupportedInterpreter executable starts a REPL with no file argument.
Language server and VS Code extensionN/AN/APull-based diagnostics, semantic tokens, hover for CLR XML docs, CodeLens reference counts on members of types/structs/interfaces/enums, signature help, inlay hints, completion, go-to-definition, references, rename, formatting, debug + test integration.
VS Code color themesN/AN/ASix bundled themes (Ember, Magma, Synthwave — Dark + Light each).