gracelang / language

Design of the Grace language and its libraries
GNU General Public License v2.0
6 stars 1 forks source link

types should support "-" #60

Closed kjx closed 8 years ago

kjx commented 8 years ago

so that we can do stuff something like:

    method assert(value) hasType (Desired) {
        match (value)
            case { _:Desired -> countOneAssertion }
            case { _ ->  failBecause "{value} is missing methods {(mirrors.typeOf(value) - Desired).methods}" }
apblack commented 8 years ago

They do, at least in minigrace. So this is a spec issue, I think.

KimBruce commented 8 years ago

I'm happy to support those uses.

apblack commented 8 years ago

It's in the spec (Type Subtraction). So I'm closing this because there is nothing to do.