ceylon/ceylon-spec — Issue #79: Move minus() to Invertable
Author: gavinking
Created: 2011-11-29 04:31:43+00:00
State: open
Labels: improvement

All the operations of Numeric have the right types except `minus()`, which for `Natural` should really return `Integer`. So I think we should move `minus()` to the `Invertable` interface. Now that we have intersection types, it's really easy to write stuff like `Numeric&Invertable`. This would be a change to the typechecker, backend, and language module.