Provide "any" Type Specifier
Provide unified support to specify that we do not care what type an object is. The object class is sufficient if we assume all classes are "new-style" classes, but there is no equivalent for "old-style" classes.
Blueprint information
- Status:
- Complete
- Approver:
- Nathan Davis
- Priority:
- Medium
- Drafter:
- Nathan Davis
- Direction:
- Approved
- Assignee:
- Nathan Davis
- Definition:
- Approved
- Series goal:
- None
- Implementation:
-
Implemented
- Milestone target:
-
release-0.1
- Started by
- Nathan Davis
- Completed by
- Nathan Davis
Related branches
Related bugs
Sprints
Whiteboard
Justification for change:
New-style classes have a common base-class -- object. Old-style classes, however, do not. And even if they did, it would not be object. Furthermore, it is conceivable that other type hierarchies may be rooted at other classes (for example, a java bridge could root all native java object to java.lang.Object).
The purpose of this improvement is to provide a unified way to simply say "I don't care what type of thing this is" when specifying a rule. The proposal is to add a variable "any" to the multidispatch module. When this variable is used in a rule, it will match any value in that position, no matter what its type is.
Update: Since there is already a built-in function called "any", the new type specifier will be named "anything" instead.
Update: Implemented and committed to SVN, revision 12.