Why I'm hesitating to switch to D

Lutger Blijdestijn lutger.blijdestijn at gmail.com
Fri Jul 1 08:50:21 PDT 2011


Robert Clipsham wrote:

> On 29/06/2011 19:14, Walter Bright wrote:
>> On 6/29/2011 4:03 AM, Adam Richardson wrote:
>>> I'll admit that I looked through to see what I could help out with on
>>> the website, but ddoc stopped me in my tracks.
>>
>> How did it stop you?
> 
> DDoc vs Markdown:
>   * Pretty much everyone who uses github, stackoverflow, and many other
> sites knows some amount of markdown
>   * I've been using D for years and I pride myself on not knowing the
> hideous DDoc beyond "Params: Example:" etc.
>   * DDoc macros make even the simplest things ugly
> 

Sure, but it's really apples and oranges. Any such template system for 
markup is both complicated, limited and convenient at once. It has no power 
at all. DDoc is the other way around, it's a very different approach. The 
equivalent to ddoc's extensibility would be hacking the sources of a 
markdown processor to extend it. Now that's painful.

You could, for example, write everything in markdown but first put it 
through ddoc and then process it's output with some markdown tool. That way 
you write mostly simple markdown and have some extra power from the macro 
system. That's actually the approach that ddoc for D code has: very limited 
sugar for the most common cases, but with the optional power to extend it. 
The other way around should be possible too: a markdown macro which tags a 
fragment for postprocessing.








More information about the Digitalmars-d mailing list