colour lib needs reviewers

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 14 14:38:27 PDT 2016


On 09/14/2016 05:31 PM, Andrei Alexandrescu wrote:
> After writing it for a few dozen times today, I figured it's objectively
> awkward to type (at least on the US keyboard): the dollar sign followed
> by the left paren is just unpleasant for mechanical reasons.
>
> The resulting look is alien too, as opposed to the more familiar
> $MACRO(a1, a2, a3) or the CPP-style MACRO(a1, a2, a3).

I meant to add here: we can improve this in a backward-compatible way by 
allowing users to choose syntax by means of some notation, e.g. this 
thing as the first macro:

DD0C_SYNTAX = $(X)

for the existing syntax, vs.

DD0C_SYNTAX = $X()

for the $MACRO(a1, a2) syntax. We may also allow users to define the 
argument separator, also on a per-document basis. By default:

DDOC_ARGUMENT_SEPARATOR = ,

We may also allow custom parens and so on.


Andrei


More information about the Digitalmars-d mailing list