[ ArgumentList ] vs. @( ArgumentList )

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Nov 6 12:56:51 PST 2012


I vote for @(ArgumentList).

Or @Arg1 @Arg2 ... as somebody mentioned.

It's more consistent with existing @-syntax.  Reusing [] is bad because
it visually conflicts with array literals (and makes parsing harder to
boot). @ is a unique symbol that, so far, is associated with attributes,
so it makes sense to use it also to mark user-defined attributes.

I don't buy the argument that other languages have a different syntax.
We're talking about D here, and what is chosen should make sense in the
context of D, without undue influence from other languages.


T

-- 
If the comments and the code disagree, it's likely that *both* are wrong. -- Christopher


More information about the Digitalmars-d mailing list