D as a Better C

Posted on

There are large and immensely useful programs written in C, such as the Linux operating system and a very large chunk of the programs written for it. While D programs can interface with C libraries, the reverse isn’t true. C programs cannot interface with D ones. It’s not possible (at least not without considerable effort) to compile a couple of D files and link them in to a C program. The trouble is that compiled D files refer to things that only exist in the D runtime library, and linking that in (it’s a bit large) tends to be impractical.

That is, until Better C came along.

Read more...

Don’t Fear the Reaper

Posted on

D, like many other programming languages in active use today, comes with a garbage collector out of the box. There are many types of software that can be written without worrying at all about the GC, taking full advantage of its benefits. But the GC does have drawbacks, and there are certainly scenarios in which … Continue reading Don’t Fear the Reaper

Read more...

Editable and Runnable Doc Examples on dlang.org

Posted on

Sebastian Wilzbach was a GSoC student for the D Language Foundation in 2016 and has since become a regular contributor to Phobos, D’s standard library, and dlang.org. This article explains the steps that were needed to have editable and runnable examples in the documentation on dlang.org. First, let’s begin with the building blocks. Unit testing in D … Continue reading Editable and Runnable Doc Examples on dlang.org

Read more...

A New Import Idiom

Posted on

Daniel Nielsen is an Embedded Software Engineer. He is currently using D in his spare time for an unpublished Roguelike and warns that he “may produce bursts of D Evangelism”. I remember one day in my youth, before the dawn of Internet, telling my teachers about “my” new algorithm, only to learn it had been … Continue reading A New Import Idiom

Read more...

Testing In The D Standard Library

Posted on

Jack Stouffer is a member of the Phobos team and a contributor to dlang.org. You can check out more of his writing on his blog. In the D standard library, colloquially named Phobos, we take a multi-pronged approach to testing and code review. Currently, there are five different services any addition has to go through: … Continue reading Testing In The D Standard Library

Read more...

How to Write @trusted Code in D

Posted on

Steven Schveighoffer is the creator and maintainer of the dcollections and iopipe libraries. He was the primary instigator of D’s inout feature and the architect of a major rewrite of the language’s built-in arrays. He also authored the oft-recommended introductory article on the latter. In computer programming, there is a concept of memory-safe code, which … Continue reading How to Write @trusted Code in D

Read more...