InfoQ

News

Source for the D.NET Compiler is Now Available

Posted by Jonathan Allen on May 15, 2009

Community
.NET
Topics
Language Design

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.

D.NET Loses Something by Eric Smith Posted May 20, 2009 9:58 AM
  1. Back to top

    D.NET Loses Something

    May 20, 2009 9:58 AM by Eric Smith

    When I learned about D (and wrote a teeny bit of code with it) a few years back, it looked extremely interesting. Here was a language that was appropriate for native/system coding but that had features of more modern environments compared to C++, like garbage collection, unit testing and design by contract.

    I'm not sure that a .NET targeted compiler is quite as compelling when compared to C#, but it would be cool to see D take off for cases when native code is more appropriate.

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.