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.
18.1 Resolved
Section titled “18.1 Resolved”- D-0001: Default type of an unsuffixed float literal
- D-0002: Attribute syntax
- D-0003: May a
&Tbe stored in a struct field? - D-0004:
ownfield with noDrop - D-0005: Function overloading
- D-0006: Is
^Traitone pointer or two? - D-0007: Keep the
!Tsigil? - D-0008: Error propagation style
- D-0009: Macro invocation syntax
- D-0010: Allocator passing
- D-0011: Concurrency
- D-0012: Hot reload
- D-0013: Is
machinenative syntax or a macro? - D-0014: Generics: monomorphize or emit C++ templates?
- D-0015: May
?wrap a pointer or reference? - D-0016: Implicit
&T→^Twidening, and what a raw pointer may do - D-0017:
^T→&T - D-0020:
or unreachablein a release build - D-0021: How
Iterate::nextspells one signature for both item kinds - D-0022: Is a slice writable through an immutable binding?
- D-0023: Where do
Ord,Add,IterateandFormatlive before the stdlib? - D-0024: Array literals, and reaching an enum variant without naming its type
- D-0025: Can a
&Tbe read as aT? - D-0026: Copying a
Tinside a compile-time branch - D-0027: One operator, two right-hand sides
- D-0028:
breakwith a value - D-0029: An associated type per implementation
- D-0030:
Error.locationis a^T - D-0031: How is a trait implemented, and where?
- D-0032: Struct inheritance
- D-0033:
moveon a copyable value - D-0034:
mut fn - D-0035: Reading a
&Tas aT— 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
cstrmade? - D-0040: A C type whose definition its header does not show
- D-0041: What a C
unionbecomes - D-0042: How a
forbinding holds its element - D-0043: How a
casebinding 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
forgets an iterator from a container - D-0052: A union variant that owns something
- D-0053:
Twhere aT?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 letbinding holds the value - D-0062: Shared ownership, and handles that may be empty
- D-0063: Integer overflow
- D-0064:
Rc<Derived>where anRc<Base>is wanted - D-0065: How
stdreaches 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
