Subject: | type constraints are overly restrictive |
Declaring Node like this, for example, doesn't allow people to use subclassing.
declare 'Node',
as Object,
where { ref($_) eq 'Map::Tube::Node' };
It would be better to do this:
declare 'Node',
as InstanceOf['Map::Tube::Node'];
InstanceOf calls $object->isa($class) on the object, so respects inheritance.