Author Topic:  [Presentation/Prezentare] D programming language  (Read 315 times)

0 Members and 1 Guest are viewing this topic.

Offline ActiON_

  • Legend
  • High-Roller
  • *
  • Posts: 3130
  • Reputation: 13
  • Gender: Male
  • Real Name: Cozmiuc Alexandru Andrei
[Presentation/Prezentare] D programming language
« on: 18 October 2015, 17:21:59 »
The D programming language

Designed by: Walter Bright, Andrei Alexandrescu (since 2006)
Developed by: Digital Mars, Andrei Alexandrescu (since 2006)
First appeared: 2001
Stable release: 2.068.1, September 6, 2015
Typing discipline: strong, static, inferred
OS: DMD: Unix-like (FreeBSD, Linux etc.), Windows, OS X
License: Boost (DMD frontend, standard and runtime libraries), source available (DMD backend), Fully open-source (LDC and GDC)
Filename extensions: .d
Website: dlang.org

The D programming language is an object-oriented, imperative, multi-paradigm system programming language created by Walter Bright of Digital Mars and released in 2001. Bright was joined in the design and development effort in 2006 by Andrei Alexandrescu. Though it originated as a re-engineering of C++, D is a distinct language, having redesigned some core C++ features while also taking inspiration from other languages, notably Java, Python, Ruby, C#, and Eiffel.

D's design goals attempt to combine the performance and safety of compiled languages with the expressive power of modern dynamic languages. Idiomatic D code is commonly as fast as equivalent C++ code, while being shorter and memory-safe.

Type inference, automatic memory management and syntactic sugar for common types allow faster development, while bounds checking, design by contract features and a concurrency-aware type system help reduce the occurrence of bugs.

Walter Bright decided to start working on a new language in 1999. D was first released in December 2001,[1] and reached version 1.0 in January 2007. The first version of the language (D1) concentrated on the imperative, object oriented and metaprogramming paradigms, similar to C++.

Dissatisfied with Phobos, D's official runtime and standard library, members of the D community created an alternative runtime and standard library named Tango. The first public Tango announcement came within days of D 1.0's release. Tango adopted a different programming style, embracing OOP and high modularity. Being a community-led project, Tango was more open to contributions, which allowed it to progress faster than the official standard library. At that time, Tango and Phobos were incompatible due to different runtime support APIs (the garbage collector, threading support, etc.). This made it impossible to use both libraries in the same project. The existence of two libraries, both widely in use, has led to significant dispute due to some packages using Phobos and others using Tango.

In June 2007, the first version of D2 was released. The beginning of D2's development signalled the stabilization of D1; the first version of the language has been placed in maintenance, only receiving corrections and implementation bugfixes. D2 was to introduce breaking changes to the language, beginning with its first experimental const system. D2 later added numerous other language features, such as closures, purity, and support for the functional and concurrent programming paradigms. D2 also solved standard library problems by separating the runtime from the standard library. The completion of a D2 Tango port was announced in February 2012.

The release of Andrei Alexandrescu's book The D Programming Language on June 12, 2010 marked the stabilization of D2, which today is commonly referred to as just "D".

In January 2011, D development moved from a bugtracker / patch-submission basis to GitHub. This has led to a significant increase in contributions to the compiler, runtime and standard library.

In December 2011, Andrei Alexandrescu announced that D1, the first version of the language, would be discontinued on December 31, 2012. The final D1 release, D v1.076, was on December 31, 2012.

Most current D implementations compile directly into machine code for efficient execution.

DMD — The Digital Mars D compiler is the official D compiler by Walter Bright. The front-end is licensed under the Boost Software License. The back-end source code is available but not under an open source license, because it was partially developed at Symantec and cannot be relicensed as open source.
GDC — A front-end for the GCC back-end, built using the open DMD compiler source code.
LDC — A compiler based on the DMD front-end that uses LLVM as its compiler back-end. The first release-quality version was published on January 9, 2009. It supports version 2.0.
D Compiler for .NET — A back-end for the D programming language 2.0 compiler. It compiles the code to Common Intermediate Language (CIL) bytecode rather than to machine code. The CIL can then be run via a Common Language Infrastructure (CLR) virtual machine.
SDC — A D compiler using a custom front-end and LLVM as its compiler back-end. It is written in D and uses a scheduler to handle symbol resolution in order to elegantly handle the compile-time features of D. This compiler currently supports a limited subset of the language.

Editors and integrated development environments (IDEs) supporting D include Eclipse, Microsoft Visual Studio, SlickEdit, Emacs, vim, SciTE, Smultron, TextMate, MonoDevelop, Zeus, and Geany among others.

Eclipse plug-ins for D include: DDT, and Descent (dead project).
Visual Studio integration is provided by VisualD.
Vim supports both syntax highlighting and code completion (through patched Ctags).
A bundle is available for TextMate, and the Code::Blocks IDE includes partial support for the language. However, standard IDE features such as code completion or refactoring are not yet available, though they do work partially in Code::Blocks (due to D's similarity to C).
A plugin for Xcode 3 is available, D for Xcode, to enable D-based projects and development.
An AddIn for MonoDevelop is available, named Mono-D.
KDevelop (as well as its text editor backend, Kate) autocompletion plugin is available.
Open source D IDEs for Windows exist, some written in D, such as Poseidon, D-IDE, and Entice Designer.

D applications can be debugged using any C/C++ debugger, like GDB or WinDbg, although support for various D-specific language features is extremely limited. On Windows, D programs can be debugged using Ddbg, or Microsoft debugging tools (WinDBG and Visual Studio), after having converted the debug information using cv2pdb. The ZeroBUGS debugger for Linux has experimental support for the D language. Ddbg can be used with various IDEs or from the command line; ZeroBUGS has its own graphical user interface (GUI).


Example:
Code: [Select]
// Sort lines
import std.stdio;
import std.array;
import std.algorithm;

void main()
{
    stdin
        .byLine(KeepTerminator.yes)
        .map!(a => a.idup)
        .array
        .sort
        .copy(
            stdout.lockingTextWriter());
}

Source/Sursa: Wikipedia
« Last Edit: 18 October 2015, 17:22:31 by ActiON_ »


Ai vreo problema/nelamurire in legatura cu forumul nostru? Citeste acest topic si daca nu ai gasit raspunsul potrivit, da un reply!