Skip to content

Use of Type. #1

Description

@lrhn

I notice that the only use of Type is reflectedType.

Maybe consider not having it at all. The only use for a Type object is to == compare it with another, so maybe replace reflectedType with isReflectedType<R>() which returns whether the reflected type is R.

Then users will have one less reason to ever care about Type objects, and we'll have one less reason to keep supporting it. The Type class should really have been placed in dart:mirrors, and it's a bad design to have runtimeType on Object. So, consider not using it at all.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions