D (programmeertaal)
De programmeertaal D, ontwikkeld door Walter Bright / DigitalMars is een programmeertaal die net als C, C++, Java en C# eigenschappen heeft van BCPL. D is gemaakt voor praktisch gebruik voor toepassingen binnen kleine tot (middel-)grote computerapplicaties.
D
| ||||
Paradigma | multi-paradigma, objectgeoriënteerd | |||
Verschenen | 1999 | |||
Ontworpen door | Walter Bright | |||
Huidige versie | 2.060 (2 augustus 2012) | |||
Typesysteem | statisch, sterk | |||
Implementaties | DMD (Digital Mars) , GDC (GNU) | |||
Beïnvloed door | C, C++, C#, Java, Eiffel | |||
Besturingssysteem | Multiplatform | |||
Website | Officiële website | |||
|
Overzicht
De taal heeft ten opzichte van C++ onder andere de volgende veranderingen doorgevoerd:
- Geen meervoudige overerving; in plaats daarvoor komt enkelvoudige overerving met interfaces en Mixins
- Design By Contract
- RAII (Resource Acquisition Is Initialization)
- Unit tests
- Garbage collection
- Dynamische arrays
- Geen verschillende attribute operatoren zoals
->
,.
en::
maar alleen.
- Introspection
- Foreach-lus
- Geavanceerde templates en class/struct-generics
De taal is desondanks een systeemtaal, zoals C++, verschillende onderdelen kunnen ook uitgeschakeld worden.
Voorbeeld
Het bekende programma Hello world:
import std.stdio; // Importeer I/O van en naar de console
public int main(in char[][] args) {
writefln("Hello World!");
return 0;
}
Zie ook
Externe links
- (en) DigitalMars
- (en) D
- (en) DSource
Programmeertalen |
---|
ABAP · ABC · ActionScript · Ada · Algol · APL · assembleertalen · AWK · B · BASIC · BCPL · C · C++ · C♯ · Clean · Clipper · COBOL · COMAL · Curry · D · Eiffel · Erlang · F♯ · Forth · Fortran · Go · Haskell · Icon · J♯ · Java · Kotlin · Lisp · Logo · Lua · m4 · ML · Modula-2 · Oberon · Object Pascal · Objective-C · Ocaml · Oz · Pascal · Perl · PHP · PL/I · PL/SQL · Prolog · Prova · Python · Rexx · RPG · Ruby · Rust · SAS · Scala · Scheme · Self · Simula · Smalltalk · Swift · TCL · TypeScript · Vala · Visual Basic |