InfoQ Homepage News Source for the D.NET Compiler is Now Available
Source for the D.NET Compiler is Now Available
This item in japanese
May 15, 2009 1 min read
Write for InfoQ
Feed your curiosity. Help 550k+ globalsenior developers
each month stay ahead.Get in touch
D is a relatively new language that, like ObjectiveC, tries to address some of the more serious problems in C++. From our interview with Cristian Vlasceanu,
In many ways D encourages the "right" behavior. For example, in C and C++, if you write "int i;" the variable is uninitialized. To do the "right thing", the programmer needs to type extra keystrokes as in "int i = 0;" but D works the other way around: "int i;" safely sets the variable to a default value (that in this case is zero). To make it uninitialized you have to spend extra effort and type "int i = void;" expressing that the uninitialized variable is intentional and not due to laziness.
D.NET is an experimental port of the D language to the Common Language Runtime. It consists of two parts, a front-end and a back-end component. The front-end component handles the parsing of source code and the generation of abstract syntax trees. The back-end compiler takes that and generates the actual machine code, or in this case IL code. While the source for both are available on CodePlex, only the back-end is maintained there. The front-end component is straight out of the D 2.0 Programming Language Compiler.
A word of caution,
The back-end code is not of production quality, it is intended for research and educational purposes. The D Programming Language is a fairly complex language, and non-trivial features such as TLS and closures make it an interesting case study for generating IL code.
This content is in the D topic
Related Topics:
-
Related Editorial
-
Related Sponsors
-
Popular across InfoQ
-
TanStack Start: A New Meta Framework Powered by React or SolidJS
-
Microsoft Patches Critical ASP.NET Core Vulnerability with 9.9 Severity Score
-
GitHub Expands Copilot Ecosystem with AgentHQ
-
Redis Critical Remote Code Execution Vulnerability Discovered after 13 Years
-
AWS Launches Capabilities by Region Tool
-
Architecture Should Model the World as It Really Is: A Conversation with Randy Shoup
-
Related Content
The InfoQ Newsletter
A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example