This is a pretty simple pitch: add
Float16 as a stdlib type. The semantics are specified by IEEE 754, so there's no real questions to resolve about the behavior, and the conformance to
BinaryFloatingPoint defines almost all of the API. The bulk of the actual implementation is handled for us by LLVM.
Implementation in progress here: https://github.com/apple/swift/pull/21738
Given how straightforward this is, I expect to progress to a formal proposal pretty quickly.
The only real question I see is what to name the type. The obvious alternative would be
Float16 is much more explicit, and (unlike
Double) there's no prior art from C/C++/etc that would lead us to use the less-clear name
Float16 it is, following the precedent set by