Actually I don't have 'a lot' examples. I just started real app development using Swift a couple of months ago.
For this specific scenario, I really like to have what I have in C/C++.
Advantages:
It can save a few key strokes and makes me as a developer feel better; and even more, makes Swift feels more swift.
auto n = 12345ull;
vs
var n: UInt64 = 12345
Real world example (unit test):
func testByteSize() {
let tests = [
(s: "1234", v: 1234),
(s: "1kb", v: 1024),
(s: "1234k", v: 1234 * 1024),
(s: "3mb", v: 3 * 1024 * 1024),
(s: "2GB", v: 2 * 1024 * 1024 * 1024),
(s: "7tb", v: 7 * 1024 * 1024 * 1024 * 1024),
]
for test in tests {
let n = test.s.parseByteSize()
XCTAssertNotNil(n)
XCTAssertEqual(UInt64(test.v), n!)
}
}
If Swift allows me to code a number as 1234ull, I won't have to do the UInt64(test.v) cast.
Moreover, I really like the tuple's v field be UInt64 instead of default Int.