Not to deny that this has a legitimate use in graphics and stuff I don't know about...
But I suspect I will see this misused more often than used correctly, when penny-wise and pound-foolish programmers feel, absent any performance or memory issue, that they don't "need" a float or double. Kind of like how when people are new to programming they often reach for uints when they "don't need negative numbers" and then get surprised-pikachu-face when their sanity checks for (x - y >= 0) are always true.
I think they could have spent the time developing more interesting features (maybe borrow some functional concepts from F# and Haskell) rather than this
There are some interesting compatibility issues around 16 bit floating point types. As well as the IEEE layout (5 exponent, 10 mantissa) there’s bfloat16 which has the same range as 32 bit float (8 exponent) but less precision (7 mantissa) https://en.wikipedia.org/wiki/Bfloat16_floating-point_format
4 comments
[ 3.5 ms ] story [ 24.9 ms ] threadBut I suspect I will see this misused more often than used correctly, when penny-wise and pound-foolish programmers feel, absent any performance or memory issue, that they don't "need" a float or double. Kind of like how when people are new to programming they often reach for uints when they "don't need negative numbers" and then get surprised-pikachu-face when their sanity checks for (x - y >= 0) are always true.
I think they could have spent the time developing more interesting features (maybe borrow some functional concepts from F# and Haskell) rather than this
I am glad they introduced it, just would like to have had a C# type alias to go alongside it.