What IDE/EDITOR do you use for D?

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 30 12:59:37 PDT 2014


On Thu, 30 Oct 2014 09:46:48 -0700
"H. S. Teoh via Digitalmars-d" <digitalmars-d at puremagic.com> wrote:

> > i recently wrote a very simple static 'writef', which genertes mixin
> > with calls to posix `write()` and i really like it. nothing serious,
> > though, and not very clear code, but it was fun to do a bit of
> > functional programming again. ;-)
> I saw that. Do you think it might be extendible enough to replace
> std.stdio.writef?
hm... with some work i'm pretty sure it will do. i added only the
things i need, but it is generic enough to process anything you want.
it can be simplified a little, but the basic mechanics are ok, i think.
it is basically state machine which parses all necessary modifier
arguments and then just going to "write-argument" state. i even passing
the modifier there, so "write-argument" can do any magic you want.

sure, it needs alot of work to fully replace current writef, but it's
mostly writing missing formatters. i even think that with some little
change user will be able to supply his own formating templates, so it
can be extended almost like `format()`. i.e. user will be able to
define states like "write-spec-x", "write-spec-d" and so on. and with
another little change it can be made to use user-specified state to
generate mixin code for writing arguments, so it can call any function
user wants in the end. this is the beauty of state machine approach. ;-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20141030/0d05a29a/attachment.sig>


More information about the Digitalmars-d mailing list