On 2013-09-12 00:02, H. S. Teoh wrote:
Constructors with many arguments are evil, because you can't just modify
one setting and use defaults for the rest; you have to specify all of
them up to the last default argument you have to change.
Currently this is possible:
LexerConfig config = { iterStyle: IterationStyle.everything, tokenStyle:
TokenStyle.source };
I would really like the following to be possible as well:
void foo (LexerConfig config);
foo({ iterStyle: IterationStyle.everything, tokenStyle:
TokenStyle.source });
--
/Jacob Carlborg