Sponsored Link •
The new programming language, D, may not be reaDy for its 1.0 release just yet, but it's harD not to be impresseD by how proDuctive one can be in it. Here's a little tale of toDay's activities, as a taster for the uninitiateD.
For any of you who follow my exploits at mixing C and C++ with other languages in the Positive Integration column in C/C++ Users Journal, you'll be aware that I've used two of my own libraries, recls and Open-RJ, as exemplars, and have had lots of fun mapping them to a variety of languages and technologies, including Ch, COM, D, Java, .NET, Python, Ruby, STL. For those who do not, recls is a platform-independent recursive search library, and Open-RJ is a structured file reader (and soon to be writer!) library for (a slightly enhanced form of) the Record-JAR format (as described in Eric Raymond's superb "The Art of UNIX Programming").
In May's issue of CUJ - on sale now! :) - I describe the choices involved in mapping Open-RJ to the D programming language versus implementing a 100% D version. (For the record, the D standard library, Phobos, now contains the 100% module std.openrj.) This is the first 100% anything implementation; all others - Python, Ruby, C++.NET, Ch, etc. - are mappings to the C-library.
In collaboraion with Lars Ivar Igesund, another D aficionado, I've been looking at expanding the functionality of Open-RJ, in terms of making record comments available at the API level, and adding functionality to write out databases back into their (text) file format.
This morning I took some time out to do the first part of this task. Adding functionality to make record comments available. For the C library, this took me 35 minutes to code and test (within the existing source files and IDE project); in D it took 10 minutes (of which half that time was spent in messing with the makefile).
How D'ya like them apples?
|Matthew Wilson is a software development consultant and creator of the FastFormat, Pantheios and STLSoft libraries. He is author of the books Imperfect C++ (Addison-Wesley, October 2004) and Extended STL, volume 1 (Addison-Wesley, 2007), and is currently working on his third, Breaking Up The Monolith: Advanced C++ Design Without Compromise. He has published over 60 articles on C++ and other topics, and has served as columnist and contributing editor for C/C++ Users Journal. Matthew believes that code should be discoverable and largely self-documenting, and lives up to that by being a hopeless documentor. He can be contacted via http://www.imperfectcplusplus.com/ or email@example.com.|