-
Notifications
You must be signed in to change notification settings - Fork 371
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
Replace true
with T
and false
with F
#1147
Conversation
Per discussion in hylang#908. True and False are still allowed. Allowing users to use these as variable names is probably more trouble than it's worth, and I figure this helps to smooth over human translation from Python code to Hy. It might be a good idea to use T and F consistently in Hy's own code, not to mention the documentation. (This preference could be stated in the style guide.) I added a bit to the documentation about the correspondences between True, False, None, and their synonyms because this didn't seem to be documented at all.
I'm sorry but I'm 👎 on this. I feel it makes the code completely unreadable, it invents a convention and provides exactly no gain over |
We should honestly get rid of But hey, that whole mess is my fault :) |
(same with |
@paultag, are you arguing for |
Huh. |
It makes sense to me that a programming language's most fundamental constants should have concise representations. |
Well, it makes sense to me that they be readable. Racket’s #t and #f is hideous, for instance. Clojure does the sensible thing. And besides, it’s not as if the extra three or four characters take up that much space on a line of code. |
This is a PR which may be closed and succeeded. Please discuss the matter on the tracking ticket #908. |
Per the straw poll in hylang#908, as an alternative to hylang#1147. Now you must use `True`, `False`, and `None`, as in Python. Or just assign `true` to `True`, etc.; the old synonyms aren't reserved words anymore.
Per discussion in #908.
True
andFalse
are still allowed. Allowing users to use these as variable names is probably more trouble than it's worth, and I figure this helps to smooth over human translation from Python code to Hy. It might be a good idea to useT
andF
consistently in Hy's own code, not to mention the documentation. (This preference could be stated in the style guide.)I added a bit to the documentation about the correspondences between
True
,False
,None
, and their synonyms because this didn't seem to be documented at all.