foo!(bar) ==> foo{bar}

superdan super at dan.org
Mon Oct 6 14:16:45 PDT 2008


bearophile Wrote:

> Walter Bright:
> > The foo.(bar) syntax seems to be sinking.
> 
> The Foo{bar} syntax looks nice enough, it's a char long, and I presume q{int} isn't a problem, but from 30 answers seems people don't see problems in the old syntax. So it's not sinking at all.

relax. he said the pissed pirate is sinking not the slashed pissed fella.

q{int} is a problem.

template q(T) { enum q = "eh"; }
writeln(q{int});

tat prints eh or int?

anyhoo every1 forgot all about tat which says how used it is. yank it walt. perl made a huge mistake with it. i been on their boards and conferences fer years. time and again they tried to add clean identifiers. y'know without the $ and @ and % and poop. and they can't because of the q{string} and qq{string} crap. language design rule #0: never design a syntactic element that starts with a non-keyword string. it's gonna bite yer ass later. 

yank the q{} walt regardless of templates n stuff. use ${} or whatever but never a short id. yer gonna thank yerself later.



More information about the Digitalmars-d mailing list