How about "auto" parameters?

Mehrdad wfunction at hotmail.com
Tue Jun 7 19:41:44 PDT 2011


== Quote from Andrej Mitrovic (andrej.mitrovich at gmail.com)'s article
> ...
> So now I have to force my code to use std.algorithm by importing via:
> import std.algorithm : min, max;
> or alternatively:
> import std.algorithm;
> alias std.algorithm.min min;
> alias std.algorithm.max max;
> Pain in the ass.

You can say that again... I have the same issue with lots of other things being declared everywhere, like
read, write, Stream/File (<-- very annoying, since they're both in std.file and std.stream), indexOf,
toString, and lots of other things I can't remember right now.

Also, I'm not sure if this bug has been fixed in DMD 2.53, but in older versions if you said something like:

	module foo1;
	import bar: baz;

and then in another file said:

	module foo2;
	import foo1;
	import bar;

and then used baz() in foo2, it would detect a collision, when in fact they were the same thing. It wouldn't
happen if baz() wasn't explicitly declared. It was really annoying to track down.


More information about the Digitalmars-d mailing list