zksecurity / noname

Noname: a programming language to write zkapps
https://zksecurity.github.io/noname/
181 stars 47 forks source link

Notes #9

Open mimoo opened 2 years ago

mimoo commented 2 years ago

To check if a list of booleans is true, I can simply add them up and check that they're not 0 (sum has an inverse)

To check if a TyKind::Field is a constant I can change the variant to TyKind::Field { constant: bool }

mimoo commented 1 year ago

perhaps I can also take a different approach for the const Field argument of functions. Because it's not a field, perhaps I should have something like Int or Number instead. I think starting with that would be better.

Because the TyKind is something created by the parser, who at this point might have no idea what the value is at runtime. Only the type checker knows

mimoo commented 1 year ago
mimoo commented 1 year ago

Let people use access fields directly if they have imported the lib? Actually should I forbid access fields in general?