Skip to content

Issue 1114 - Feature Request: exclude from using - haxe #1114

Closed
@issuesbot

Description

@issuesbot

[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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions