Why I'm hesitating to switch to D

Robert Clipsham robert at octarineparrot.com
Wed Jun 29 11:42:41 PDT 2011


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

Code:

DDoc:
$(LINK http://my.url/)
$(LINK2 http://my.url/, My URL)

Markdown:
http://my.url/
[My URL](http://my.url)

DDoc:
$(UL
   $(LI $(LINK2 http://a/, A))
   $(LI Nesting
      $(UL
          $(LI I daren't go another layer deeper $(LPAREN)$(LINK2 
http://b/, honestly)$(RPAREN)
           )
        )
    )
  )
Markdown:
  * [A](http://a/)
  * Nesting
    - I could go deeper with this without it being hideous
      + (No really http://foo.bar/)
      + I could just keep going
        * [and it's still not ugly](http://b/)


Another bonus of markdown: It (or a subset of it) could probably be 
added to ddoc without much effort given its simplicity, without breaking 
anything. Seems like a no-brainer to me.

PS: I probably missed some parenthesis in the DDoc version. That's not 
intentional, that just comes from DDoc macros being hideous and just 
generally terrible.
-- 
Robert
http://octarineparrot.com/


More information about the Digitalmars-d mailing list