Worthwhileness of mixing new language-level keyword into classic arguments comma-separated list is at least questionable.
It maybe make sense to consider following expanded form to _coexist_ with current shorthand:
Shorthand (classical argument list):
attr(bgcolor, color, black)
Expanded (JSON-like associative array):
attr(
name: bgcolor,
type: color,
fallback: black
)
In shorthand form, arguments are listed in algoristic order.
In expanded form, order can be arbitrary which make this serve to be mnemonically friendly as your purpose is:
attr(
fallback: black,
type: color,
name: bgcolor
)
16.09.2011, 03:07, "fantasai" <fantasai.lists@inkedblade.net>:
> Currently the syntax of attr() is
> е║е║е║attr(<ident>, <type>, <fallback>)
> e.g.
> е║е║е║attr(bgcolor, color, black)
>
> I get rather confused with positional syntaxes, because I can never remember which
> argument goes first, second, etc. So I've been pondering alternatives and came up
> with
> е║е║е║attr(<ident> as <type>, <fallback>)
> e.g.
> е║е║е║attr(bgcolor as color, black)
>
> which makes it less positional -- the type is more closely tied to the attribute
> name than to the fallback, and then the comma behaves to separate alternatives
> like it does in font-family.
>
> Thoughts?
>
> ~fantasai