www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2658] New: Remove EscapeString literals.

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2658

           Summary: Remove EscapeString literals.
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: clugdbug yahoo.com.au


The ability to create escape strings is a waste of the backslash character.
"hello world" \n
is not sufficiently superior to
"hello world\n"


-- 
Feb 13 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2658





------- Comment #1 from shro8822 vandals.uidaho.edu  2009-02-13 11:42 -------

Try that again with several different \ things in the string. it quickly get
unreadable.


-- 
Feb 13 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2658





------- Comment #2 from ary esperanto.org.ar  2009-02-13 11:55 -------
Can you provide an example? Whenever I read a separated \n or \t it seems like
it doesn't belong to the string and it confuses me, it makes it more
unreadable.


-- 
Feb 13 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2658





------- Comment #3 from shro8822 vandals.uidaho.edu  2009-02-13 13:25 -------
Just to clarify, I /don't/ like the suggestion.


-- 
Feb 13 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2658





------- Comment #4 from clugdbug yahoo.com.au  2009-02-16 05:38 -------
C has got by with it perfectly well for an awful long time.


-- 
Feb 16 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2658





------- Comment #5 from jarrett.billingsley gmail.com  2009-02-16 10:23 -------
So has virtually every other language.  I don't think I have *ever* seen the
backslash string literals used in any D source.  I doubt most people even know
of their existence.


-- 
Feb 16 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2658





------- Comment #6 from shro8822 vandals.uidaho.edu  2009-02-16 13:12 -------

I use them often when for literals of length 1. E.g.

return stringVar ~ \n;


-- 
Feb 16 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2658





------- Comment #7 from wbaxter gmail.com  2009-02-16 19:21 -------
(In reply to comment #6)
 I use them often when for literals of length 1. E.g.
 
 return stringVar ~ \n;

That's no where near worth the price of giving up a whole symbol in my opinion. But I think such a change should probably be bundled with an agreement on what to actually do with the freed up character. If the syntax is removed and D never does anything with it, then that's a waste. \n is not useless, it's just an underperforming use of \. What to do with it should be decided upon before giving it the axe. (lambdas were suggested somewhere). --
Feb 16 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2658





------- Comment #8 from maxmo pochta.ru  2009-02-18 05:11 -------
I also don't like these escaped chars hanging around on their own.
Lambdas are expected to be just a minor syntax sugar for delegate literals:
return statement and parameter types will be removed.


-- 
Feb 18 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2658





------- Comment #9 from bugzilla digitalmars.com  2009-02-20 21:17 -------
It's a good idea to remove them. The feature didn't turn out to be interesting
or useful, and it's time to clean out some detritus.


-- 
Feb 20 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2658


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #10 from bugzilla digitalmars.com  2009-03-11 14:51 -------
Fixed dmd 2.026


-- 
Mar 11 2009