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

Should boolean variable names also end in '?' just like boolean returning predicate functions? #261

Open
anoopemacs opened this issue Nov 23, 2024 · 1 comment

Comments

@anoopemacs
Copy link

No description provided.

@seancorfield
Copy link
Collaborator

I don't think there's much consensus on this. Some people like to use ? to indicate a symbol that is bound to a Boolean, but a lot of people feel it should only be used for predicate functions.

I'm in the latter camp -- we have ! and * (and ?) for functions fairly commonly, meaning "mutates"(not safe in a transaction), "implementation" (often for the non-caching version of some fn or for the implementation fn of a macro) -- but we don't use any similar notations for local bindings. The only fairly common Var-level (non-function) annotation we tend to use is earmuffs *some-dynamic-var* and that's partly because that used to be required.

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