> On Nov 13, 2017, at 2:42 PM, Slava Pestov <spes...@apple.com> wrote: > > >> On Nov 13, 2017, at 11:40 AM, John McCall via swift-dev <swift-dev@swift.org >> <mailto:swift-dev@swift.org>> wrote: >> >> - I feel like we're not boxing ourselves in too much to assume a layout of >> the generic requirements. Having a base offset already imposes a pretty >> steep compatibility requirement — e.g. even if we significantly generalized >> a type's generic signature, we would still need to store old requirements >> (when actually obeyed) in the appropriate places for the old signature, or >> else the old pattern just doesn't work at all. As long as we can extend >> that with more information later, we don't really suffer from making layout >> assumptions today. > > Do you mean if we significantly generalized the schema for generic > requirements, or if we changed the definition of a single type to be more > general? I would rather the latter did not happen.
I mean changing the definition of a type to be more general, and I think it's probably inevitable. I mean, we're already anticipating at least generalizing things to accept move-only types, although that at least has the advantage of not corresponding to a change in runtime protocol conformances. > Accessing generic arguments efficiently is important for extension methods, I > think. In fact right now even thin functions recover metadata from a thick > metatype argument if its the last parameter, although perhaps this is not > intentional. We recover metadata from all arguments, I think, unless it's a protocol witness. John.
_______________________________________________ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-dev