Glossary
- COW (Copy On Write)
- COW is a memory allocation strategy where arrays are copied
if they are to be modified.
- GC (Garbage Collection)
- Garbage collection is the common name for the more highbrow
term automatic memory management. Memory can be allocated and used,
and the GC will automatically free any chunks of memory no longer
referred to. In contrast, C and C++ use explicit memory management
where the programmer must carefully match up each allocation with
one and only one free.
- Illegal
- A code construct is illegal if it does not conform to the
D language specification.
This may be true even if the compiler or runtime fails to detect
the error.
- Implementation Defined Behavior
- This is variation in behavior of the D language in a manner
that is up to the implementor of the language.
An example of implementation defined behavior would be the size in
bytes of a pointer: on a 32 bit machine it would be 4 bytes, on
a 64 bit machine it would be 8 bytes.
Minimizing implementation defined behavior in the language will
maximize the portability of code.
- RAII (Resource Acquisition Is Initialization)
- RAII refers to the technique of having the destructor
of a class object called when the object goes out of scope.
The destructor then releases any resources acquired by
that object.
RAII is commonly used for resources that are in short supply
or that must have a predictable point when they are released.
- Undefined Behavior
- Undefined behavior happens when an illegal code construct is
executed. Undefined behavior can include random, erratic results,
crashes, faulting, etc.