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
Here are two ways in which this feature could be implemented:
Provide a PRBMathSolarray library in the test/utils directory (libraries cannot be extended, unfortunately)
Provide a new helper in each value type's Helpers.sol file, i.e. a join helper with multiple overloads
The first solution is more verbose, but clearer, whereas the second solution is more elegant (in a programming sense). Still, it could be misunderstood to mean "joining" numbers in a mathematical sense. TBD.
Side note: I happen to have already added these helpers for PRBMath in my fork of Solarray
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
As suggested by @andreivladbrg privately, it would be helpful if PBRMath came with
solarray
-style functions for convenient array initialization:Here are two ways in which this feature could be implemented:
PRBMathSolarray
library in thetest/utils
directory (libraries cannot be extended, unfortunately)Helpers.sol
file, i.e. ajoin
helper with multiple overloadsThe first solution is more verbose, but clearer, whereas the second solution is more elegant (in a programming sense). Still, it could be misunderstood to mean "joining" numbers in a mathematical sense. TBD.
Side note: I happen to have already added these helpers for PRBMath in my fork of
Solarray
Beta Was this translation helpful? Give feedback.
All reactions