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
I'd want to be able to both have numeric generics without having to resort to the workaround from #4633, and to be able to perform basic arithmetic on them. My current use case is to do addition to both other generics and constants (e.g. N + N + 1), but it seems multiplication and subtraction are common patterns as well.
This is also related to #4633, since many of the above fall into scenarios where the current workaround to force a generic value to be numeric (i.e. make it an array length) don't work.
Workaround
None
The text was updated successfully, but these errors were encountered:
Problem
There's multiple design patterns that result in the need to declare generic array lenghts that are calculated on some other generic value.
Examples include:
or
Happy Case
I'd want to be able to both have numeric generics without having to resort to the workaround from #4633, and to be able to perform basic arithmetic on them. My current use case is to do addition to both other generics and constants (e.g.
N + N + 1
), but it seems multiplication and subtraction are common patterns as well.Project Impact
Blocker
Impact Context
Lack of this feature blocks multiple things, such as
flatten
as requested by @LogvinovLeon here, or AztecProtocol/aztec-packages#5492 which is required for non-trivial aztec-nr data structures.This is also related to #4633, since many of the above fall into scenarios where the current workaround to force a generic value to be numeric (i.e. make it an array length) don't work.
Workaround
None
The text was updated successfully, but these errors were encountered: