This repository was archived by the owner on Dec 13, 2022. It is now read-only.
Should we standardize on a notation for static indexing? #456
satnam6502
started this conversation in
Ideas
Replies: 2 comments
|
I'm happy to go either way, the reason for choosing this particular notation was that it matches Coq.Vector indexing style. I was initially going to do the indexing as a Coq vector, but it requires the indices are given as Fin.t. I also wasn't sure what version of indexing is preferable- in the Coq vector (after peel'ing) or via |
0 replies
|
I think we should use the notation and put it in a special |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
In #452 @blaxill defines a notation for static indexing:
I'm wary of using
Notationtoo much. Perhaps here there is a case for using it to express static indexing? If that is the case then we should think about standardizing it across the codebase and putting it intoCavaPrelude. If it was up to me I'd just useindexConstdirectly but I can understand that might not be popular with everyone else and the use of@in #452 does make the indexing clearer:a <- xor2 (x[@0], x[@7]) ;; b <- xor2 (x[@2], x[@7]) ;; c <- xor2 (x[@3], x[@7]) ;;What do people think? Useful enough to put in
CavaPrelude?If yes, this this the notation you'd vote for, or do you have an alternative suggestion?
All reactions