-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
I discovered Zig yesterday and have spent pretty much all my time since then delving into it and reading various materials on it. Loving it so far.
One feature that I feel is missing currently is built-in support for fixed-point numbers. As the language doesn't allow operator overloading, this isn't something I could implement in user code and use like any other numeric type. For reference, the Embedded C standard specifies support for such numbers (refer to Annex A), although I'm not aware of any C compiler that supports them for a desktop target.
I found it interesting that Zig offers support for variable-width integers through i#
and u#
. I wonder if this could be applied to fixed-point numbers by supporting some form of Q-notation, perhaps?