Movatterモバイル変換


[0]ホーム

URL:


D Logo
Menu
Search

Language Reference

table of contents

Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.Requires a signed-in GitHub account. This works well for small changes.If you'd like to make larger changes you may want to consider usinga local clone.

Glossary

Contents
    ACC (Associated C Compiler)
    The D compiler is matched to the Associated C Compiler. For example, on Win32 ImportC is matched to the Digital Mars C compiler, and can be matched to the Visual C compiler using the command line switch-m32mscoff. Win64 ImportC is matched to the Visual C compiler. On Posix targets, the matching C compiler is Gnu C or Clang C.
    BLIT (Block Transfer)
    Also known as BLT, blit refers to copying memory byte for byte. In C, this is referred to as a memcpy operation. The name originated with the BLT instruction on the DEC PDP-10 computer.
    CTFE (Compile Time Function Evaluation)
    Refers to the ability to execute regular D functions at compile time rather than at run time.
    Code Point
    In Unicode terminology, acode point is a logical character. The range of code points is0 through0x10FFFF. Onlydchars can store code points directly; arrays ofchar andwchar need to use the variable-length encodingsUTF-8 andUTF-16.
    COW (Copy On Write)
    COW is a memory management strategy where (usually large) reference objects are copied if they are to be modified. The constant overhead of COW can be high, but may be preferable in applications that would otherwise do a lot of preemptive copying.
    Data Race
    Two or more threads writing to the same memory location. Program behavior may depend on the arbitrary sequencing of these memory accesses.
    Functor
    A user-defined type (struct or class) that defines the function call operator (opCall in D) so it can be used similarly to a function.
    GC (Garbage Collection)
    Garbage collection is the common name for the 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, explicit memory management is where the programmer must carefully match up each allocation with one and only one call to free().
    Higher-Order Function
    A function that either accepts another function as a parameter, returns a function, or both.
    IES (Interpolated Expression Sequence)
    Avalue sequence of interspersed string literals and expressions. Seespec.
    IFTI (Implicit Function Template Instantiation)
    Refers to the ability to instantiate a template function without having to explicitly pass in the types to the template. Instead, the types are inferred automatically from the types of the runtime arguments. Seespec for details.
    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.
    Input Range
    A type (i.e., a struct or a class) that defines the member functionsempty,front, andpopFront. Input ranges are assumed to be strictly one-pass: there is no way to save the state of the iteration in a copy of the range. See alsostd.range.
    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.
    Lvalue
    An lvalue is an abstract term referring to a value with an accessible address (through e.g. the unary& operator). Typical examples of lvalues include variables, constants introduced withconst orimmutable (but notenum), and elements of arrays and associative arrays. Calls to functions that returnref and pointer dereference expressions are also lvalues. Lvalues can be passed to (or be returned from) functions by reference. An lvalue is the counterpart to an rvalue.
    NRVO (Named Return Value Optimization)

    NRVO is a technique invented by Walter Bright around 1991 (the term for it was coined later) to minimize copying of struct data. Functions normally return their function return values in registers. For structs, however, they often are too big to fit in registers. The usual solution to this is to pass to the function ahidden pointer to a struct instance in the caller's stack frame, and the return value is copied there. For example:

    struct S {int a, b, c, d; }S foo(){    S result;    result.a = 3;return result;}void test(){    S s = foo();}

    is rewritten as:

    S* foo(S* hidden){    S result;    result.a = 3;    *hidden = result;return hidden;}void test(){    S tmp;    S s = *foo(&tmp);}

    This rewrite gives us an extra temporary objecttmp, and copies the struct contents twice. What NRVO does is recognize that the sole purpose ofresult is to provide a return value, and so all references toresult can be replaced with*hidden.foo is then rewritten as:

    S* foo(S* hidden){    hidden.a = 3;return hidden;}

    A further optimization is done on the call tofoo to eliminate the other copy, giving:

    void test(){    S s;    foo(&s);}

    The result is written directly into the destinations, instead of passing through two other instances.

    Narrow Strings
    All arrays that usechar,wchar, and their qualified versions are narrow strings. (Those includestring and wstring). Range-oriented functions in the standard library handle narrow strings specially by automatically decoding the UTF-encoded characters.
    opApply
    A special member function used to iterate over a collection; this is used by theForeachStatement.
    opApplyReverse
    A special member function used to iterate over a collection in the reverse order; this is used by theForeachStatement.
    POD (Plain Old Data)
    Refers to a struct that contains no hidden members, has no destructor, and can be initialized and copied via simple bit copies. SeeStructs.
    Predicate
    A function or delegate returning a Boolean result. Predicates can be nullary (take no arguments), unary (take one argument), binary (take two arguments), or n-ary (take n arguments). Usually predicates are mentioned within the context ofhigher-order functions, which accept predicates as parameters.
    Qualifier-Convertible
    A typeT is qualifer-convertible to typeU if and only if they only differ in qualifiers and if a reference toT can be implicitly converted to a reference toU per thelanguage rules.
    RAII (Resource Acquisition Is Initialization)
    RAII refers to the technique of having thedestructor of a struct or 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. RAII can be used for class variables declared with thescope storage class.
    Rvalue
    An rvalue is an abstract term referring to a value resulting from an expression that has no accessible memory address. This lack of address is only conceptual; the implementation has the liberty to store an rvalue in addressable memory. Rvalues cannot be changed and cannot be passed to (or be returned from) functions by reference. An rvalue is the counterpart to an lvalue.
    Sequential Consistency
    Data being written in one order in one thread being visible in the same order to another thread.
    SFINAE (Substitution Failure Is Not An Error)
    If template argument deduction results in a type that is not valid, that specialization of the template is not considered further. It is not a compile error. See alsoSFINAE.
    TMP (Template Metaprogramming)
    TMP is using the template features of the language to execute programs at compile time rather than runtime.
    TLS (Thread Local Storage)
    TLS allocates each thread its own instance of the global data. See alsoWikipedia.
    UB (Undefined Behavior)
    Undefined behavior happens when an illegal code construct is executed. Undefined behavior can include random, erratic results, crashes, faulting, etc. A buffer overflow is an example of undefined behavior.
    UDA (User-Defined Attribute)
    User-defined attributes are metadata attached to symbols used for compile-time reflection.
    UFCS (Uniform Function Call Syntax)
    Uniform function call syntax refers to the ability to call a function as if it were a method of its first argument. For examplefunct(arg) may be written asarg.funct().
    Windows Programming
    Legacy Code
    Copyright © 1999-2026 by theD Language Foundation | Page generated byDdoc on Sat Feb 21 00:13:46 2026

    [8]ページ先頭

    ©2009-2026 Movatter.jp