Description
[Google Issue #1114 : https://code.google.com/p/haxe/issues/detail?id=1114]
by heinz.ho...@googlemail.com, at 01/08/2012, 10:13:21
It would be nice if you have the option to remove a specific function from using.
Something like
@ :noUsing public static function ...
If you define classes like Strings, Arrays, Lists with functions for List manipulation you usually define some conversion functions from other type.
Example:
class Arrays { public static function fromIterator (it:Iterator<T>):Array<T> ... }
class Lists { public static function fromIterator (it:Iterator<T>):List<T> ... }
Adding these utility classes in using-scope is useful, but it in this case for example it pollutes the context of Iterators with stupid functions.
var it:Iterator<Int>;
it.fromIterator // what is iterator.fromIterator, this doesn't make sense
Arrays.fromIterator(it) // Yes this makes sense
It's also counter-productive to define a new class like ArrayConversions for stuff like this, because it requires that the user of a library knows both classes. And it is also cumbersome to switch between them, because it's actually the same context for stuff like this.
What do you think?
Activity