Primitive Type Wrappers #8

Closed
opened 2023-02-23 04:51:52 +01:00 by kayomn · 1 comment
Owner

It may be worth considering the value of elevating the type aliases provided in coral lL (coral::u8, coral::i64, etc.) into distinct object types.

While there's always the risk it makes it harder for the compiler to optimize simple types, doing so would still have some advantages in the arenas of type safety and program correctness.

Object wrappers would provide stronger and more finely tuned conversion rules, allow for attaching utility methods, and allow for runtime checked arithmetic operations that can return errors instead of silently overflowing or Nan propagating

It may be worth considering the value of elevating the type aliases provided in coral lL (`coral::u8`, `coral::i64`, etc.) into distinct object types. While there's always the risk it makes it harder for the compiler to optimize simple types, doing so would still have some advantages in the arenas of type safety and program correctness. Object wrappers would provide stronger and more finely tuned conversion rules, allow for attaching utility methods, and allow for runtime checked arithmetic operations that can return errors instead of silently overflowing or Nan propagating
Author
Owner

No longer applicable as there is no longer any C++ in the codebase.

No longer applicable as there is no longer any C++ in the codebase.
Sign in to join this conversation.
No description provided.