A very basic blog about D

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Jul 7 08:55:31 PDT 2013


On 7/7/13 8:00 AM, John Colvin wrote:
> I had some free time so I decided I should start a simple blog about D,
> implementing some unix utilities. I've (unsurprisingly) started with echo.
>
> http://foreach-hour-life.blogspot.co.uk/
>
> It's nothing ground-breaking, but every little helps :)

Nice idea! Comments:

- The imperative version writes an extra space at the end (the joiner 
version does not have that problem).

- The echo utility has an odd way to process the cmdline: if exactly the 
first argument is a -n, then do not writeln at the end.

- It's quite likely the joiner-based version will be slower because it 
writes one character at a time. (Would be great to test and discuss 
performance as well.)

Here's a conformant implementation for reference: 
http://www.scs.stanford.edu/histar/src/pkg/echo/echo.c


Andrei


More information about the Digitalmars-d-announce mailing list