Kill implicit joining of adjacent strings

Stewart Gordon smjg_1998 at yahoo.com
Sat Nov 13 17:42:46 PST 2010


On 12/11/2010 09:53, Andrei Alexandrescu wrote:
<snip>
> Well put me on board then. Walter, please don't forget to tweak the
> associativity rules: var ~ " literal " ~ " literal " concatenates
> literals first.

You mean make ~ right-associative?  I think this'll break more code than 
it fixes.

But implementing a compiler optimisation so that var ~ ctc ~ ctc is 
processed as var ~ (ctc ~ ctc), _in those cases where they're 
equivalent_, would be sensible.

ctc = compile-time constant

Stewart.


More information about the Digitalmars-d mailing list