Skip to content

Pre-release 0.0.6 - #152

Open
ryanwilsond wants to merge 15 commits into
mainfrom
staging
Open

Pre-release 0.0.6#152
ryanwilsond wants to merge 15 commits into
mainfrom
staging

Conversation

@ryanwilsond

@ryanwilsond ryanwilsond commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Description

This pre-release focuses on interfaces and improved templates.

Language Changes

  • Added: .NET System.ValueTuple<T1,...> types are now treated like native tuples
  • Added AttributeUsage attribute to specify what symbols an attribute can be applied to
  • Can no longer define a reverse clause on an enum method
  • Added template user-defined operators for static operators (must be type-inferred)
  • Added user-defined compound assignment and in-place increment/decrement operators
  • Added template user-defined conversions (must be type-infererred)
  • Added template parameter default values
  • Added method type template inference
  • Added: compile-time expressions are now considered "compile-time" for the sake of constexpr local and field initializers (i.e. something like constexpr int a = $Func(); is now allowed)
  • Added non-type template support to .NET endpoints (Rw/nontypetemplates #156)
  • Added: For "each" loops can now iterate on expressions of types that implement System.Collections.Generic.IEnumerable<T> or System.Collections.IEnumerable if compiling with .NET assemblies
  • Added: throw expressions can now derive from System.Exception if compiling with .NET assemblies
  • Added MustUseReturnValue attribute that errs at call sites ignoring method return value
  • Added extern blocks so DllImport attribute is only typed once per library instead of per member
  • Added interfaces (Rw/interfaces #153)
  • Added multiline strings
  • Attributes are now error checked
  • Added Buffer<T>.Length "property" instead of using LowLevel.Length<type TElem>(Buffer<TElem>)
    • E.g. Buffer<int> a = {1, 2, 3}; int b = a.Length;
  • Can no longer construct the type containing the entry point (because it has weaker field definite assignment guarantees)
  • Can no longer use a conditional access if the receiver is not nullable
  • Can no longer use a null coalescing operator if the left side is not nullable
  • Can no longer use is null or isnt null on operands of non-nullable types

Standard Library Changes

  • Removed redundant use of ! for types for clarity to readers
    • Also updated the docs to reflect this, but the exclamation mark is still allowed to use even though redundant
  • Added following methods to String class:
    • static bool! Contains(string! text, string! substring)

CLI Changes

  • --version now shows installed directory of compiler
  • build and run commands now treat unhandled arguments as arguments passed to the build script
    • To specify a build script file path, now the -f <path>/--file <path> option must be used

Build Script API Changes

  • Builder.AddRef and Builder.AddDep will fallback to searching PATH environment variable if the given path does not otherwise exist
  • Build function can now optionally accept Buffer<string> or string[] arguments passed from the command-line (e.g. buckle build arg1 arg2)

Bug Fixes

  • Nested template local functions emit and substitute properly
  • Functions, function pointers, and pointers now substitute template parameters correctly
  • Concurrent builds no longer crash when trying to remap the entry point if it was a local function
  • A class containing a struct containing a fixed buffer no longer crashes when emitting
  • Methods marked const can now call their own local functions without err
  • Null coalescing on value types emits the proper types now
  • Overrides are now nullability-sensitive
  • Parameters allow const ref const modifiers now
  • PE structs always have an empty constructor now and always allow using a default literal
  • Can now emit PE methods with by-ref parameters
  • User-defined conversions are now error checked (e.g. cannot define a conversion to void, cannot define an identity conversion, etc.)
  • Compiler now errs instead of crashing on stack overflows caused by deeply nested source code
  • Non-type templates correctly bind without crashing on recursive underlying type
  • State methods now check that all code paths return
  • using aliases now honor nullable annotations
  • Fixed some samples not working with --evaluate
  • User-defined conversions now will now reduce numerics if applicable

Known Issues

  • Definite assignment analysis cannot see definite assignment of pattern locals in expressions like a is int b && b == 3

Other

  • Modified many Graphics library methods/types to no longer be as nullable

@ryanwilsond ryanwilsond self-assigned this Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant