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 to Decodable because it has associated type.
If it remove Decodable, we will able to do it.
- Support subclass.(restrict)
Himotoki don't support subclass now, because DecodedType 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.
Swift2.1 function is returnable
Selftype in class, so I think we don't needDecodedTypenow.That is destructive change, but it has some advantages.
Now we cannot cast any value to
Decodablebecause it has associated type.If it remove
Decodable, we will able to do it.Himotoki don't support subclass now, because
DecodedTypebounds base class.But swift don't support override extensions function, the merit will be restrict.
If you aspect runtime check.