> On Jun 2, 2016, at 2:05 PM, Xiaodi Wu <[email protected]> wrote:
>
>
> In the earlier conversation, it was pointed out (by Dave A., I think?) that
> examples such as Array.size show how this solution can get confusing. And
> even though there aren't fixed-length arrays in Swift, those may come one
> day, making the syntax even more confusing.
Array.count is a function taking an instance; I’m not sure I agree it would be
terribly confusing… then again I run in Xcode with the quick help pane open so
I see the doc comments for every type, property, and function as I move around
the code. It’s quite handy :)
I could see including memory in the name (or something similar) if we want to
be extra clear about it.
Int.memorySize
Int.memoryAlignment
Ultimately the type’s size in memory is a property of the type so it seems
clear that is where it belongs (being careful not to steal too much of the
namespace of course).
Russ_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution