Skip to content

18. Decisions log

Every design question settled with the user, and every one still open, is a file in docs/decisions/, named D-NNNN-slug.md. D-00NN is the decision this spec, the code and the build log cite as 18.NN — the numbers were kept when the table became files, so 18.32, §18.32 and D-0032 all name struct inheritance. A new decision takes the next free id and is cited as D-NNNN.

python tools/track.py decisions lists them, one line each; docs/decisions/README.md says how to write one.

  • D-0001: Default type of an unsuffixed float literal
  • D-0002: Attribute syntax
  • D-0003: May a &T be stored in a struct field?
  • D-0004: own field with no Drop
  • D-0005: Function overloading
  • D-0006: Is ^Trait one pointer or two?
  • D-0007: Keep the !T sigil?
  • D-0008: Error propagation style
  • D-0009: Macro invocation syntax
  • D-0010: Allocator passing
  • D-0011: Concurrency
  • D-0012: Hot reload
  • D-0013: Is machine native syntax or a macro?
  • D-0014: Generics: monomorphize or emit C++ templates?
  • D-0015: May ? wrap a pointer or reference?
  • D-0016: Implicit &T → ^T widening, and what a raw pointer may do
  • D-0017: ^T → &T
  • D-0020: or unreachable in a release build
  • D-0021: How Iterate::next spells one signature for both item kinds
  • D-0022: Is a slice writable through an immutable binding?
  • D-0023: Where do Ord, Add, Iterate and Format live before the stdlib?
  • D-0024: Array literals, and reaching an enum variant without naming its type
  • D-0025: Can a &T be read as a T?
  • D-0026: Copying a T inside a compile-time branch
  • D-0027: One operator, two right-hand sides
  • D-0028: break with a value
  • D-0029: An associated type per implementation
  • D-0030: Error.location is a ^T
  • D-0031: How is a trait implemented, and where?
  • D-0032: Struct inheritance
  • D-0033: move on a copyable value
  • D-0034: mut fn
  • D-0035: Reading a &T as a T — the open half of 18.25
  • D-0036: Using a T? when both outcomes continue
  • D-0037: Read-only pointers, and what C’s const T* becomes
  • D-0038: How C’s unscoped enums and #defines come in
  • D-0039: How is a cstr made?
  • D-0040: A C type whose definition its header does not show
  • D-0041: What a C union becomes
  • D-0042: How a for binding holds its element
  • D-0043: How a case binding holds the payload
  • D-0044: Assigning to a &mut T
  • D-0045: A union variant that is an existing struct
  • D-0046: State that lives for the whole program
  • D-0047: The standard allocators
  • D-0048: Compile-time conditionals, and where a location comes from
  • D-0049: Evaluation order, and pointers as numbers
  • D-0050: Slices, text and bytes, and moving out of raw memory
  • D-0051: How for gets an iterator from a container
  • D-0052: A union variant that owns something
  • D-0053: T where a T? is wanted
  • D-0054: Traits an enum has without an impl
  • D-0055: The standard library’s math
  • D-0056: Variadic parameters
  • D-0057: Where a module’s imports are declared
  • D-0058: Whether a dependency’s names reach the modules that depend on this one
  • D-0059: What reflection describes, and how a field carries metadata
  • D-0060: An attribute the compiler does not know
  • D-0061: How an if let binding holds the value
  • D-0062: Shared ownership, and handles that may be empty
  • D-0063: Integer overflow
  • D-0064: Rc<Derived> where an Rc<Base> is wanted
  • D-0065: How std reaches the operating system
  • D-0066: Generic methods
  • D-0067: Random numbers
  • D-0068: Files and paths
  • D-0069: Characters in UTF-8 text
  • D-0070: Sorting
  • D-0071: Text operations
  • D-0072: Arguments passed by name
  • D-0073: Library formatting
  • D-0074: When macros expand
  • D-0075: How a macro is written
  • D-0076: Hygiene, for declarations
  • D-0077: Where macros live
  • D-0078: Methods on unions
  • D-0079: Diagnostics in an expansion
  • D-0080: Formatting as macros
  • D-0081: The collections pass
  • D-0082: Formatting a pointer
  • D-0083: SlotMap and Key in std
  • D-0084: The C heap through an import of stdlib.h, and no alloc or free builtins
  • D-0085: Struct layout is the C++ compiler’s, in declaration order
  • D-0086: Projections take their depth range as a required argument
  • D-0087: The orphan rule counts a trait’s type arguments
  • D-0088: The module carrying a recipe owns the header’s types
  • D-0089: Implicit argument conversions through ImplicitAs
  • D-0090: A recipe can build a library with its own CMake
  • D-0091: Ties: checked reference invalidation, and memory placed by the compiler
  • D-0092: How does a function say the text it returns points into nothing that dies?
  • D-0093: Views are borrowed: no bare str, slices or cstr, and no view outside a reference’s places
  • D-0094: Safe code has no undefined behaviour: closing the holes ties leave
  • D-0095: A String keeps short text in place, and a view inside an element dies with the array