This would be great. I've solved this recently by making a TypeRepresentation type that is initialized with any T, and conforms to Hashable. Of course internally this just uses String(T), but at least that's abstracted from the caller.
-- Keith Smiley On 07/01, Matthew Johnson via swift-evolution wrote: > +1 here as well. It would be nice to have. > > > > On Jul 1, 2016, at 9:15 AM, Sean Heber via swift-evolution > > <[email protected]> wrote: > > > > +1 here, too. Looking like someone needs to write a full proposal! :P > > > > l8r > > Sean > > > > > >> On Jul 1, 2016, at 9:11 AM, Tony Allevato via swift-evolution > >> <[email protected]> wrote: > >> > >> +1. I've had to do this a couple times and ended up wrapping them in > >> string interpolations, which makes me feel terrible. > >> > >> On Fri, Jul 1, 2016 at 6:26 AM David Sweeris via swift-evolution > >> <[email protected]> wrote: > >> +1 > >> > >>> On Jul 1, 2016, at 8:20 AM, Adrian Zubarev via swift-evolution > >>> <[email protected]> wrote: > >>> > >>> Additive question: > >>> > >>> • Can a type instance of a type SomeType.self SomeType.Type be Hashable? > >>> I really would want to use these in dictionaries or sets :) > >>> > >>> [Any.Type: ValueType] > >>> > >>> Set<Any.Type> // Union type universe > >>> > >>> > >>> > >>> > >>> -- > >>> Adrian Zubarev > >>> Sent with Airmail > >>> > >>> _______________________________________________ > >>> swift-evolution mailing list > >>> [email protected] > >>> https://lists.swift.org/mailman/listinfo/swift-evolution > >> > >> _______________________________________________ > >> swift-evolution mailing list > >> [email protected] > >> https://lists.swift.org/mailman/listinfo/swift-evolution > >> _______________________________________________ > >> swift-evolution mailing list > >> [email protected] > >> https://lists.swift.org/mailman/listinfo/swift-evolution > > > > _______________________________________________ > > swift-evolution mailing list > > [email protected] > > https://lists.swift.org/mailman/listinfo/swift-evolution > > _______________________________________________ > swift-evolution mailing list > [email protected] > https://lists.swift.org/mailman/listinfo/swift-evolution _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
