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

Plain status constants #50

Closed
eelstork opened this issue Nov 13, 2020 · 2 comments
Closed

Plain status constants #50

eelstork opened this issue Nov 13, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@eelstork
Copy link
Collaborator

eelstork commented Nov 13, 2020

For logging purposes status constants (done, cont, fail) are postfixed with a () which may optionally include logging information:

return done(log && "All caught up");

Without disregarding #28, test-oriented workflows are less dependent on logging and, overall, an option to use plain status constants would be welcome.

Still unclear whether both plain and annotated status constants may coexist in the same class (it only looks impossible). That isn't really a problem though.

Also, marginal performance gains with raw constants.

@eelstork eelstork added the enhancement New feature or request label Nov 13, 2020
@eelstork
Copy link
Collaborator Author

  • Plain and bracing constants in the same context is possible. Performance is roughly the same as before. Underlying pattern is not simple, so this should be done in a branch first to ensure no typing related conflicts.
  • A separate namespace may be provided for 'raw' status values. They are twice as fast, which may seem a lot, but probably isn't (overall impact in practical applications, likely very small).

Reasonably, splitting the namespace should be the first option.

@eelstork
Copy link
Collaborator Author

813a48d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant