Improving ddoc

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 31 12:30:47 PST 2014


On Wed, Dec 31, 2014 at 11:50:51AM -0800, Andrei Alexandrescu via Digitalmars-d wrote:
> Hello,
> 
> In wake of the recent discussions on improving ddoc syntax we're
> looking at doing something about it. Please discuss any ideas you
> might have here.  Thanks!
> 
> One simple starter would be to allow one escape character, e.g. the
> backtick (`), as a simple way to expand macros: instead of $(MACRO
> arg1, arg2) one can write `MACRO arg1, arg2`.
[...]

The problem with using only a single escape character is that it's
ambiguous when nested. If you write `X`Y`Z`, should it be interpreted as
$(X $(Y)) or $(X)Y$(Z)?

Also, the people complaining about $(MACRO ...)) syntax aren't
complaining about the $(...) part specifically, but about the MACRO
part. No matter how you try to prettify it, $(MACRO x y z) is still
`MACRO x y z`. As long as you have a single syntax for all macros, the
syntax people won't be happy. What they are clamoring for is dedicated
syntax for the most common macros, so that they don't have to keep
repeating the MACRO part of the invocation.

Besides, ddoc syntax is really the least of our problems right now, what
with functionality issues like:

	https://issues.dlang.org/show_bug.cgi?id=9731
	https://issues.dlang.org/show_bug.cgi?id=13270
	https://issues.dlang.org/show_bug.cgi?id=13272
	https://issues.dlang.org/show_bug.cgi?id=13676

just to name a few. Everyone wants a new coffee machine but nobody cares
about nuclear reactor usability issues.


T

-- 
Music critic: "That's an imitation fugue!"


More information about the Digitalmars-d mailing list