DLang Spec rewrite (?)

Borden 2013 at bordenrhodes.com
Sat May 25 17:56:09 PDT 2013


On Sunday, 26 May 2013 at 00:28:05 UTC, Andrei Alexandrescu wrote:
> To generate several formats from one source, a macro system is 
> needed. One interesting thing I figured about macro systems is 
> they're all dirty - they can't be really considered "languages" 
> because they intermix the programming part with the very output 
> generated. So, what macro system would you use? (Actual 
> question.) Look at m4 - it won't win any beauty contests, 
> either, and it's enormously complicated. DDoc is simple for 
> what it does, it has somehow hit a sweet spot.

Good evening, Professor,

I'm not arguing with the macro system or proposing a replacement. 
I think, for what it's designed to do, it works perfectly well 
and, you're right, is somewhat faster and cleaner than XML tags. 
(and this is from someone who's biased in favour of HTML tags)

My contention is that, for the purposes of writing lengthy, 
non-code documentation like the DLang spec (I'm not referring to 
any other documentation or pages on the site), enclosing the 
entire exposition in macros has made the source too inflexible 
for me to work with without awkward workarounds or having to 
write my own parser. Again, the idea is to use the features of 
HTML5 and compile the DLang spec into an ePub document that I can 
read on my brand-new Kobo.

Therefore, I'm not proposing a radical overhaul of DDoc or 
recommending that all known DDoc be recoded in HTML, as I mention 
in my other forum threads. Rather, I'm mentioning that, for my 
purposes, the DLang Spec source is too difficult for me to work 
with in its current state for my purposes and I'm offering to 
recode it in a language that will allow me to accomplish what I 
want to do; keep the DLang spec easy to read, write and maintain; 
and tread on as few toes as possible.


More information about the Digitalmars-d mailing list