[ ArgumentList ] vs. @( ArgumentList )

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Nov 7 10:41:21 PST 2012


On Wed, Nov 07, 2012 at 06:28:54PM -0000, Regan Heath wrote:
> On Wed, 07 Nov 2012 18:17:20 -0000, Jacob Carlborg <doob at me.com> wrote:
> 
> >On 2012-11-07 16:51, Nick Sabalausky wrote:
> >
> >>vote++
> >>
> >>It has all the benefits of '@(...)' (which are very compelling on
> >>their own), but also has the *ONE* benefit of '[...]': Much less
> >>getting lost in stupid parenthesis, as demonstrated here:
> >>http://forum.dlang.org/thread/k7afq6$2832$1@digitalmars.com?page=14#post-puseurlcwbgvigwkdowu:40forum.dlang.org
> >
> >This is how that example would look like with my syntax:
> >
> >http://pastebin.com/8Ve5KS49
> >
> >I think it looks better in most cases
> 
> For comparison the same again using @[]:
> http://pastebin.com/vgjLSXMv
> 
> I actually think the pastebin syntax highlighting makes both of them
> look worse (why the horrid green!).
> 
> Here it is with no highlighting:
> http://pastebin.com/08judqWj
[...]

Hmm. Having seen both @() and @[] in actual sample code, I have to say
that @() is visually less distracting and more pleasant to read (to me,
anyway, YMMV). I don't like @[] because it just stands out too much.


T

-- 
"I'm running Windows '98." "Yes." "My computer isn't working now." "Yes, you already said that." -- User-Friendly


More information about the Digitalmars-d mailing list