digitalmars.D.bugs - [Issue 10581] New: Undefined identifier "std.uni.isWhite" when passing string lambda to std.algorithm.filter
- d-bugmail puremagic.com (26/26) Jul 09 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10581
- d-bugmail puremagic.com (21/21) Jul 09 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10581
http://d.puremagic.com/issues/show_bug.cgi?id=10581 Summary: Undefined identifier "std.uni.isWhite" when passing string lambda to std.algorithm.filter Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: minor Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: monkeyworks12 hotmail.com import std.algorithm; import std.uni; void main() { //Compiles auto x = [" "].filter!(a => a.canFind!(not!isWhite)); ///.../std/functional.d(56): Error: undefined identifier isWhite auto y = [" "].filter!"a.canFind!(not!isWhite)"; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 09 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10581 Jonathan M Davis <jmdavisProg gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |jmdavisProg gmx.com Resolution| |INVALID PDT --- Sorry, but that's not a bug. It's one of the major reasons that the newer lambda syntax was introduced. The string lambda syntax only works with stuff that's imported by std.functional, and there's no reason for std.functional to import std.uni other than making string lambdas work with std.uni, and we obviously can't make that work with everything, because we can't have std.functional importing everything. Also, while I don't particularly like it (as string lambdas are really nice for short stuff), Andrei and Walter seem to be in favor of phasing out string lambdas anyway. But you're really not saving much by using a string lambda here anyway, so in this particular case, I don't think that that's much of a loss. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 09 2013