UInt16
UInt16 stores values from 0 through 65_535.
local port: UInt16 = 8_080local nextPort = port + 1print(`port={nextPort}`)Use UInt16 when a protocol or binary representation requires this width. A nonnegative business rule alone is not a reason to replace validation with an unsigned type.
local wide: UInt32 = 65_000local port = UInt16(wide)Narrowing is explicit and checked.
