You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The WebGPU API uses more specialized flavors of Int like unsigned long and unsinged long long. It's practical to newtype these over Int, but then, when doing bitmasks, one can't get the underlying Int without exposing the newtype constructor. If Bitwise operators like and, and or were all in a typeclass, this would allow us to derive newtype and would allow other specializations.
The text was updated successfully, but these errors were encountered:
That is one approach. Another is that the WebGPU library could define its own type class for doing this to make it easier on the library.
The reason why I'm suggesting this is that I'm not sure where else this need arises other than in that library. So, is it really worth introducing the type class here? Or does it suffice to put it there?
Also, those operators have special compiler support, so just adding a type class may require updates to the compiler (I don't know for sure, but it's something that would need to be checked).
The WebGPU API uses more specialized flavors of
Int
likeunsigned long
andunsinged long long
. It's practical to newtype these overInt
, but then, when doing bitmasks, one can't get the underlyingInt
without exposing the newtype constructor. If Bitwise operators likeand
, andor
were all in a typeclass, this would allow us toderive newtype
and would allow other specializations.The text was updated successfully, but these errors were encountered: