> On Jan 27, 2017, at 4:43 PM, Anton Zhilin via swift-evolution
> <[email protected]> wrote:
>
> Current alternative to default generic arguments is typealias, like
> basic_string and string in C++:
>
> struct BasicBigInt<T> { ... }
> typealias BigInt = BasicBigInt<Int64>
This is a really great point, but it should be noted that this is only
sufficient to accomplish source-stability. Once the standard library starts
providing ABI stability, this solution won’t work for it — the type of BigInt
will become BasicBigInt<Int64> which will change mangling and other things.
First-class generic defaults, on the other hand, have the potential to be built
out so that any binary compiled against the old type definition continues to
work. The details of what this looks like depends on precisely how the final
ABI shakes out.
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution