[swift-dev] Documentation for Int and UInt is misleading
dabrahams at apple.com
Mon Feb 8 07:56:20 CST 2016
on Mon Feb 08 2016, Ole Begemann <swift-dev-AT-swift.org> wrote:
> Int and UInt have different sizes on 32-bit and 64-bit platforms. The
> documentation for Int currently says this, however:
> "Int: A 64-bit signed integer value type."
> I was caught off guard by this twice in the last few months, so I'd
> like to improve the docs and say something like this:
> "Int: A signed integer value type that has the same size as the
> current platform's native word size. On a 32-bit platform, Int is the
> same size as Int32. On a 64-bit platform, Int is the same size as
> (Taken word for word from The Swift Programming Language at
> The documentation comment is currently generated for all integer types
> in stdlib/public/core/FixedPoint.swift.gyb
> so we would need to add a conditional there and handle Int and UInt
> Before I proceed to do that, I wanted to ask if it would be a welcome
> change. If you have suggestions on how to word this better, I'd love
> to hear them.
Absolutely, it would be welcome. Please submit a pull request!
More information about the swift-dev