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

Suggestion: update description of \providebool #47

Open
Bosef1 opened this issue Sep 28, 2024 · 2 comments
Open

Suggestion: update description of \providebool #47

Bosef1 opened this issue Sep 28, 2024 · 2 comments

Comments

@Bosef1
Copy link

Bosef1 commented Sep 28, 2024

Am working with etoolbox v2.5k. In documentation for \providebool , suggest adding description of how the flag value is set or preserved. Have included existing text and suggested possible improved text below. Unsure if this is the correct forum for this, please advise if better location to submit.

\providebool current description:
"Defines a new boolean flag called unless it has already been defined. This
command is robust."

suggested improved description (or however the commend is expected to behave):
"Defines a new boolean flag called unless it has already been defined. This
command is robust. If already defined, the state of the flag is unchanged. If newly defined, the initial state of the flag is false."

@josephwright
Copy link
Owner

The \provide... model comes from \providecommand, where the idea that things are unchanged if they already exist is implicit. etoolbox makes the same assumption for e.g. \providerobustcmd - I'm not sure that picking out \providebool is necessary. Can you explain why you feel this one needs to be handled specially?

@Bosef1
Copy link
Author

Bosef1 commented Sep 30, 2024

Sir, \providebool just happened to the be command I was working with for my document, which is why I suggested it receive expanded description above. The same rational and statement would also apply to \providetoggle. The rational for inclusion is to make explicit to the user in what state the \providebool and \providetoggle commands set their flags when created, and that they do not change the state of the flags if they already exist. I think with the description right now, technically the behavior in either case is undefined, and could change in future revisions of etoolbox.

Understood if my suggestion is overly pedantic. The current behavior is as expected, and it may be overkill to document and maintain documentation on every little thing. Also, I may be unintentionally trying to set software interface requirements through documentation. I am unsure if you maintain a interface requirements specification or similar for etoolbox. If such a thing exists, that might be a better place to document specific expected behaviors such as the above.

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

2 participants