I completely agree with Haravikk. This is not C, we have type inference, and this behaviour is different from other non-failable lossy conversions in Swift.
Regarding uses of ‘truncating’, Xiaodi is wrong. The documentation of BinaryInteger.init<T: FloatingPoint>(_ source: T) in the accepted proposal specifically uses the term in the way the original poster used it: /// Creates an integer from the given floating-point value, truncating any /// fractional part. (https://github.com/apple/swift-evolution/blame/master/proposals/0104-improved-integers.md#L444) Cheers, Guillaume Lessard _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
