On this page

1. Scope and conformance

1.1 Semantics

CS-SCOPE-001. DirectSharp semantics define the language. A backend must preserve those semantics; representative C# lowering illustrates an implementation rather than redefining source behavior.

1.2 Language and backend boundary

CS-SCOPE-002. DirectSharp is strongly typed and .NET-first. CLR classes, interfaces, generics, delegates and ordinary external libraries remain directly usable. No feature adapter or wrapper is required to call a normal .NET API.

DirectSharp does not prescribe a .NET SDK or runtime version. The user-facing library uses the DirectSharp namespace; a small DirectSharp.Runtime support layer supplies implementation helpers where needed. A helper's emitted name is not automatically a public language API.

1.3 Core boundaries

CS-SCOPE-003. Tuple destructuring and special slicing/range-index syntax are excluded from v1.0. Tuple values and named elements remain supported. Take, TakeLast and Skip are library operations.

CS-SCOPE-004. copy_of is shallow copying. Deep copying is an optional library policy rather than a universal core operation.

CS-SCOPE-005. Features are typed compile-time adapters over APIs. Wrappers render DirectSharp, and expanded source passes through normal binding and checking. Neither mechanism is a runtime interceptor or arbitrary AST plugin system.

1.4 Conformance

An implementation conforms when accepted source has the specified binding, typing, evaluation, diagnostics and observable behavior. Rejecting invalid source is part of conformance. Source locations must remain useful through lowering and generated code.


Specification contents · Next: 2. Lexical structure