Skip to content

Instantly share code, notes, and snippets.

Feature name

Introduction

Bitwise and arithmetic operators are very different, and their precedence relationship is not obvious.

Simplifying guard case/if case syntax

  • Proposal: TBD
  • Author: Erica Sadun
  • Status: TBD
  • Review manager: TBD

Introduction

This proposal re-architects guard case and if case grammar for unwrapping complex enumerations. It drops the case keyword from if and guard, replaces = with ~=, and introduces the := operator that combines declaration with assignment.

Nil struct

Introduction

Change nil literal type from () to Nil.

Refine if case syntax

Introduction

Change syntax of pattern-matching versions of if and guard.

       /────────────────────── Domain 1
      /
     /                       /───────────── Domain 2
    /                       /
─────────────────────────────────────────────────────── Core operators
             \
              \──────────────────────────── Domain 3
               \
 \──────────────── Domain 4

Refactor Metatypes, repurpose T.self and Mirror

Introduction

This proposal want to revise metatypes T.Type, repurpose public T.self notation to return a new Type type instance rather than a metatype, merge SE-0101 into Type, rename the global function from SE-0096 to match the changes of this proposal and finally rename current Mirror type to introduce a new (lazy) Mirror type.

Refactor metatypes

Introduction

  • Rename metatypes T.Type to Metatype