[swift-evolution] Trial balloon: conforming sizeof, sizeofValue, etc. to naming guidelines
Josh Parmenter
jparmenter at vectorform.com
Thu Apr 28 15:55:15 CDT 2016
I think this is a nice suggestion as well.
Best,
Josh
On Apr 28, 2016, at 1:52 PM, Joe Groff via swift-evolution <swift-evolution at swift.org<mailto:swift-evolution at swift.org>> wrote:
On Apr 28, 2016, at 11:44 AM, Xiaodi Wu via swift-evolution <swift-evolution at swift.org<mailto:swift-evolution at swift.org>> wrote:
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?
Seems reasonable to me.
-Joe
_______________________________________________
swift-evolution mailing list
swift-evolution at swift.org<mailto:swift-evolution at swift.org>
https://lists.swift.org/mailman/listinfo/swift-evolution
Joshua Parmenter | Engineering Lead, Apple Technologies
T 248 777 7777
C 206 437 1551
F 248 616 1980
www.vectorform.com<http://www.vectorform.com/>
Vectorform
2107 Elliott Ave Suite 303
Seattle, WA 98121 USA
Think Tank. Lab. Studio.
We invent digital products and experiences.
SEATTLE | DETROIT | NEW YORK | MUNICH | HYDERABAD
More information about the swift-evolution
mailing list