Skip to content

Conversation

@martinfouilleul
Copy link
Collaborator

@martinfouilleul martinfouilleul commented Apr 23, 2025

Maintaining a count along an oc_list comes up a number of times in the codebase, so it may be useful to add that to the oc_list struct itself. Having that would also allow reverse indexed for loops on list (although this usecase it a lot less frequent)

@rdunnington @Parzival-3141 @Skytrias what do you think? And would it cause problems with the language bindings (since it modifies the length of the list struct and might not map 1-to-1 to language native constructs)

Needed if we agree this is a good idea:

  • review places where we maintain a separate count and use list.len instead
  • update api.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants