Yao G. Wrote:

> On Wed, 10 Nov 2010 20:34:07 -0600, bearophile <bearophileh...@lycos.com>  
> wrote:
> 
> > Do you seen anything wrong in this code? It compiles with no errors:
> >
> > enum string[5] data = ["green", "magenta", "blue" "red", "yellow"];
> > static assert(data[4] == "yellow");
> > void main() {}
> >
> >
> > Yet that code asserts. it's an excellent example of why a sloppy  
> > compiler/language sooner or later comes back to bite your ass.
> 
> Stop blaming the compiler for your own carelessness.

I fully agree with this. It's odd to see only few people opposing this, because 
the feature has no merit. If the language needs to be overly verbose in every 
turn, bearophile could go and use Java instead.

> 
> >
> > In C the joining of adjacent strings is sometimes useful, but explicit  
> > is better than implicit, and D has a short and good operator to perform  
> > joining of strings, the ~, and D strings are allowed to span multi-lines.
> 
> I find it useful, and I like it. I like to break long strings into smaller  
> ones
> and put each one in one line. I know that you can do that using one single  
> string, but
> some syntax hightlighters don't like it that way.

Multiline strings have traditionally required stupid hacks. D might be the only 
string oriented language with so many useful string literals. Very useful in 
string processing.

> 
> > Despite Walter seems to ignore C#, C# is a very well designed language,  
> > polished, and indeed it refuses automatic joining of adjacent strings:
> > [...]
> > This is one of the about twenty little/tiny changes I am waiting for D.
> 
> Maybe you should switch to C# :)

Or Java.
> 
> > So please kill automatic joining of adjacent strings in D with fire.
> 
> No.

votes++

Reply via email to