DecodedType is removable at Swift 2.1
tarunon opened this issue · comments
Swift2.1 function is returnable Self
type in class, so I think we don't need DecodedType
now.
public protocol Decodable {
/// - Throws: DecodeError
static func decode(e: Extractor) throws -> Self
}
That is destructive change, but it has some advantages.
- as Decodable.
Now we cannot cast any value toDecodable
because it has associated type.
If it removeDecodable
, we will able to do it. - Support subclass.(restrict)
Himotoki don't support subclass now, becauseDecodedType
bounds base class.
But swift don't support override extensions function, the merit will be restrict. - Integration operators.(Array, Dictionary, Optional.)
If you aspect runtime check.
I tried implement that. :3
https://github.com/tarunon/Himotoki/tree/feature/remove_decodedtype
Closing this since this is implemented in #100 and I've just released 2.0.0-beta.1. 😉