> A better proposal than using different category codes is
> programming macros with optional arguments obeying
> a convention that makes a choice of delimiters available to users.
> Any macro package replacing \@ifnextchar[ by some
> \ifx\let@token\opt@arg@delim could be run this way.
> If no LaTeXY will adopt this, I will call it LüTeX :-)
I had thought of posting such a "feature request" earlier,
refrained from it for not having found a good idea how
to implement it. If I now found it so simple, I must have
overlooked a problem ...
This would mean that so many \foo in the LaTeX kernel
reading their optional argument by \@foo[#1] must be replaced.
At least I have now thought how such macros would have to
look like instead (sketch, \SetOptArgDels chooses delimiters,
\foo is an example command with one optional argument):
-- where one had \def\@foo[#1]... so far.
Maybe this already is in xparse? Sorry, I cannot afford more right now ...
1. there would be no need to change preamble-only commands,
2. as I realize at reading Heiko's comment, the "ambiguity" only
arises with macros whose *last* (e.g., only) arguments are optional.