Jump to content

  • Log In with Google      Sign In   
  • Create Account

Aldacron

Member Since 16 Oct 1999
Offline Last Active Today, 07:25 AM

Journal Entries

D Bits > Extended Package Protection in D

Posted 02 March 2016

Since the D1 days, D has had a package protection attribute akin to Java's (though unlike Java, it is not the default). Applying package protection to any symbol in a module makes it accessible only to modules in the same package.module mylib.mypackage.mymodule;package struct MyStruct {...}class MyClass { package void doSomething() {...}}
Given the abo...


D Bits > My New Book: Learning D

Posted 29 November 2015

From late February up until about two weeks ago, I've had my head down over my keyboard working on a book about the D programming language for PACKT called 'Learning D'. The electronic version is currently available from the publisher's site for roughly half-price. Both kindle and print versions are available at Amazon , though not at the sale price....


D Bits > D Tip: Use Scope Statements in Proper Scope

Posted 03 November 2013

One D construct I often use is the scope guard statement . This allows you to write code that executes when a scope exits under one of three circumstances: an exception is thrown, no exception is thrown, or always. Example:void main() { import std.stdio; scope( failure ) { writeln( "I only execute when the scope exits due to an exception bein...


D Bits > Functional Me

Posted 23 January 2013

I recall very clearly the first time I ever saw a video game. It must have been in the summer of either '78 or '79, just before my 7th or 8th birthday. I walked into a local 7-11, just a short distance from my house, and was puzzled to see this big box surrounded by a bunch of older kids. Space Invaders. The first time I saw the screen, it blew my mind. I...


D Bits > Binding D to C Part Five

Posted 31 December 2012

This is the fifth and final part of a series on creating bindings to C libraries for the D Programming Language.In part one , I introduced the difference between dynamic and static bindings and some of the things to consider when choosing which kind to implement. In part two , I talked about the different linkage attributes to be aware of when declaring e...


PARTNERS