> It seems that they'll have 16 bit floats encoded in shorts (16 bit integers). This seems like it could be a huge footgun.
I agree, fortunately the upcoming Primitive Classes [1] will make it possible to create a float16 type by wrapping a short without any overhead, thus acting essentially as a type safe alias.
It's also likely that the JDK will come with an ad'hoc type as the Vector API seems to currently be considering adding a HalfFloat class [2] so that you can leverage float16 directly with SIMD logic which is obviously one of the major benefits. See JDK-8290204 [3] for more details about it.
[1] https://openjdk.org/jeps/401
[2] https://github.com/openjdk/panama-vector/blob/vectorIntrinsi...