July 09, 2013 [Issue 10581] New: Undefined identifier "std.uni.isWhite" when passing string lambda to std.algorithm.filter | ||||
---|---|---|---|---|
| ||||
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 --- Comment #0 from monkeyworks12@hotmail.com 2013-07-09 08:42:35 PDT --- 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: ------- |
July 09, 2013 [Issue 10581] Undefined identifier "std.uni.isWhite" when passing string lambda to std.algorithm.filter | ||||
---|---|---|---|---|
| ||||
Posted in reply to monkeyworks12@hotmail.com | 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 --- Comment #1 from Jonathan M Davis <jmdavisProg@gmx.com> 2013-07-09 10:10:22 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: ------- |
Copyright © 1999-2021 by the D Language Foundation