[Issue 16602] Implicit string concatenation and precedence of ~

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Nov 24 18:51:59 PST 2016


https://issues.dlang.org/show_bug.cgi?id=16602

Joseph M Rice <ricejm01 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ricejm01 at gmail.com

--- Comment #4 from Joseph M Rice <ricejm01 at gmail.com> ---
I actually have to complain about this whole thing. In C/C++, Java, C# and
virtually every programming language based on the C syntax allows for implicit
string concatenation.   

Allowing this to be depreciated you are making the D language harder to use.

the rationale for the reasoning for why all of sudden we have to start using ~
to break up long strings so that the code is readable is quite frankly
Bullshit!

Case in point.

this:

string[] names =
[
    "Anna",
    "Michael"
    "Emma",
    "David"
];
// The content of arr is [ "Anna", "MichaelEmma", "David" ]

Vs.

string aReallyLongString = "this is a really long string that will" 
                           "not look good on the page if it put on"
                           " a single line";


There is a huge difference between Array assignment and single string
assignment.  How about you revert the changes in 2.072 and re-implement to fix
the actual problem, which solely with array assignment and look for '[' ']'
characters to not allow implicit string concatenation.  

At this point 2.072 is not usable, and I would appreciate not having to fix
~20,000 lines of code to add '~' everywhere.   Not to mention you just broke
almost every dub library I use as well.

--


More information about the Digitalmars-d-bugs mailing list