> On Jun 21, 2016, at 3:02 PM, Dave Abrahams via swift-evolution > <swift-evolution@swift.org> wrote: > > If I didn't think it would produce semantic confusion, these would be > static members e.g. `Array.memoryAlignment`, and you'd have to “scan > past” `Array`. It's a perfectly natural way to express a property of a > type.
I think Array<Int>.memoryAlignment is quite different to scan than MemoryLayout(Array<Int>).alignment (And I obviously like the former a lot more if it wouldn't produce semantic confusion -- I assume you mean in the compiler and not the reader of the code). That said, I think memoryAlignment(Array<Int>.self) reads better than MemoryLayout(Array<Int>).alignment You don't have to brainparse(TM by Cognition Inc) two other things before arriving at alignment. The MemoryLayout feels more prominent than it should. The alignment feels less prominent than it should. I recognize we disagree on this, and we're unlikely to convince each other on-list, which is why I tried hard to make sure that your alternative was properly presented in the proposal. If I have made any errors in expressing your design, its intent, and rationale, please let me know and I will edit the proposal to fix. -- E
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution