[swift-evolution] Trial balloon: conforming sizeof, sizeofValue, etc. to naming guidelines

Xiaodi Wu xiaodi.wu at gmail.com
Thu Apr 28 13:44:52 CDT 2016

We all know and love sizeof(), but given that it's different from its C
counterpart anyway, shouldn't these conform to Swift naming guidelines? In
other words, after SE-0006, shouldn't these names be as follows?

size<T>(of: T.Type)
size<T>(ofValue: T)
stride<T>(of: T.Type)
stride<T>(ofValue: T)
align<T>(of: T.Type)
align<T>(ofValue: T)

There are obvious issues with two different things named `stride`, but IMO
that's best addressed by renaming one of them; the real problem is that the
word stride is used in two different ways already. Thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160428/7fad9a8a/attachment.html>

More information about the swift-evolution mailing list