[Issue 11103] w and d suffix for char literals too

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 15 04:26:45 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11103



--- Comment #3 from bearophile_hugs at eml.cc 2013-11-15 04:26:43 PST ---
(In reply to comment #2)
> Well, I implemented it.
> 
> It was pretty easy, but I'm really not sure if it's worth doing after all.
> 
> https://github.com/yebblies/dmd/tree/issue11103

Thanks to a patch from Kenji we'll be able to write:


import std.algorithm: map, joiner;
import std.string: text;
void main() {
    string r = [1, 2]
               .map!(x => [1, 2].map!(y => dchar('*')))
               .joiner("_")
               .text;
}


But having the same string suffixes is shorter, better and more uniform with
the string syntax:

.map!(x => [1, 2].map!(y => '*'d))

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list