Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random statements concerns #979

Open
matteo-cristino opened this issue Nov 24, 2024 · 0 comments
Open

Random statements concerns #979

matteo-cristino opened this issue Nov 24, 2024 · 0 comments
Labels
discussion topic under discussion and collective analysis

Comments

@matteo-cristino
Copy link
Collaborator

My concerns regarding the random statements are as follows:

  1. Use of the object keyword
    The term "object" is used extensively in the following statements:
    When I create random object of '' bits
    When I create random object of '' bytes
    When I create array of '' random objects
    When I create array of '' random objects of '' bits
    When I create array of '' random objects of '' bytes
    When I pick random object in ''
    When I create random dictionary with '' random objects from ''
    However, "object" usually implies a richer structure, whereas these statements seem to refer to simpler data types like sequences of bits or bytes. This makes the term "object" potentially misleading.
  2. Use of in instead of from in When I pick random object in ''
    • The preposition in is less intuitive here. Using from would better indicate the source of the random selection.
    • Additionally, the pick keyword creates a random_object inside the Zenroom memory. It might be more logical to align this behavior with create to maintain consistency.
  3. Ambiguity in When I create random dictionary with '' random objects from ''
    This statement can also create an array when picking random elements from an array, which introduces ambiguity.

Proposed changes

Refactoring the first statements to eliminate "object" in favor of more precise terms or a simplified structure:

When I create random '' bits long
When I create random '' bytes long
When I create array of '' random
When I create array of '' random '' bits long
When I create array of '' random '' bytes long

This aligns with the base statement:

When I create random ''

Open question

For the last two statements I am not able to find a correct way to rewrite them because I thought about

When I pickup randomly one element from '' # change 'in' to 'from' and 'pick' to 'pickup' (to follow also `when I pickup from path`)
When I pickup randomly '' elements from '' # total refactor

but where does the random element(s) will be stored?

@matteo-cristino matteo-cristino added the discussion topic under discussion and collective analysis label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion topic under discussion and collective analysis
Projects
None yet
Development

No branches or pull requests

1 participant