Re: Problem with UFCS

2012-10-18 Thread Michael
Thank you guys. I can't believe that haven't thought of that. I still feel that this is rather odd though. I would expect to be able to use UFCS in the scope that imports those libraries. Though I can definitely see how that might lead to obscure bugs. On Tuesday, 16 October 2012 at 17:07:36 U

Re: Problem with UFCS

2012-10-16 Thread Jonathan M Davis
On Tuesday, October 16, 2012 18:28:14 Adam D. Ruppe wrote: > On Tuesday, 16 October 2012 at 16:12:06 UTC, Michael wrote: > > void main() { > > > > import std.range, std.stdio; > > The problem is that UFCS only works on functions in the global > scope. The import inside a function makes them local

Re: Problem with UFCS

2012-10-16 Thread Adam D. Ruppe
On Tuesday, 16 October 2012 at 16:12:06 UTC, Michael wrote: void main() { import std.range, std.stdio; The problem is that UFCS only works on functions in the global scope. The import inside a function makes them local, so it doesn't consider them in it. This is apparently by design