> On May 2, 2016, at 9:46 AM, Dave Abrahams via swift-evolution > <swift-evolution@swift.org> wrote: > > > on Sun May 01 2016, Xiaodi Wu <xiaodi.wu-AT-gmail.com> wrote: > >> It's a bad habit of mine, I guess, to err on the side of suggesting >> conservative >> changes on the assumption that it'll be maximally acceptable. If there's >> appetite for a more serious renaming, and as you say these are considered >> relatively rarely used, then it's a world of possibility! >> >> We could do as Shawn suggested and follow precedent in some other languages >> by >> moving these functions out of the global scope. Perhaps these will meet with >> some satisfaction: >> >> ``` >> Memory.footprint(of:) >> Memory.alignment(of:) >> Memory.spacing(of:) >> ``` > > I'd rather have > > MemoryLayout<T>.size > MemoryLayout<T>.alignment > MemoryLayout<T>.spacing
This would be a legit use for 'extension Any'. IMO it'd be even better as just T.size, T.alignment, T.spacing. -Joe _______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution