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

Giving the option of setting the autoStart for the "from*" functions #108

Open
constraintAutomaton opened this issue Oct 21, 2024 · 4 comments

Comments

@constraintAutomaton
Copy link

Hi everyone,

I wonder if it would fit the library's design to give functions like fromArray the option to set the autoStart to a user-defined value. If this is the case, I can make a PR for it.

@jeswr
Copy link
Collaborator

jeswr commented Oct 21, 2024

The main reason not to would be due to the planned breaking changes around / removal of autostart discussed in #25, but given that they have been sitting there for such a long time (my fault), I think it is reasonable to add such options.

@constraintAutomaton
Copy link
Author

Thanks for the reply! I will make a PR this week then.

@constraintAutomaton constraintAutomaton changed the title Giving the option of setting the autoStart for the "from*" function Giving the option of setting the autoStart for the "from*" functions Oct 21, 2024
@rubensworks
Copy link
Collaborator

Can't you just use the ArrayIterator constructor directly?

@constraintAutomaton
Copy link
Author

constraintAutomaton commented Oct 21, 2024

I did that to fix my issue. However, I feel it should be an option with those functions because it changes the behavior quite a lot, and it can be unexpected that the iterator starts "without intervention". Of course, those functions are pretty simple, so building the iterator by oneself is not difficult. So, maybe it is unnecessary, but I think we can argue that those functions as a whole might not be necessary.

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

No branches or pull requests

3 participants