The goal here is support a field native type which can be used to implement efficient native circuits. We also want to support arbitrary extensions. A proposed syntax would be, instead of e.g. u1, we have f1 which represents a native field element with extension 1.
The key challenge with supporting native field elements is that they cannot support all forms of arithmetic. For example, they cannot be used for division, or bitwise operations, etc. Even assigning values of integer type (e.g. u32) to a field element might be restricted in some way (e.g. ensuring that, for the given field type, the value being assigned fits).
Potentially, we should mark any function that uses a native field element with a modified like native or unsafe.
The goal here is support a field native type which can be used to implement efficient native circuits. We also want to support arbitrary extensions. A proposed syntax would be, instead of e.g.
u1, we havef1which represents a native field element with extension1.The key challenge with supporting native field elements is that they cannot support all forms of arithmetic. For example, they cannot be used for division, or bitwise operations, etc. Even assigning values of integer type (e.g.
u32) to a field element might be restricted in some way (e.g. ensuring that, for the given field type, the value being assigned fits).Potentially, we should mark any function that uses a native field element with a modified like
nativeorunsafe.