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

Replace true with T and false with F #1147

Closed
wants to merge 1 commit into from

Conversation

Kodiologist
Copy link
Member

Per discussion in #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.

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.
@olasd
Copy link
Member

olasd commented Nov 3, 2016

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 true/false.

@paultag
Copy link
Member

paultag commented Nov 4, 2016

We should honestly get rid of true and false as well, having "one way" to do it seems right to me

But hey, that whole mess is my fault :)

@paultag
Copy link
Member

paultag commented Nov 4, 2016

(same with nil)

@Kodiologist
Copy link
Member Author

@paultag, are you arguing for T and F or True and False?

@rcarmo
Copy link
Contributor

rcarmo commented Nov 17, 2016

Huh. T and F, seriously? .... but.... why?

@Kodiologist
Copy link
Member Author

It makes sense to me that a programming language's most fundamental constants should have concise representations.

@rcarmo
Copy link
Contributor

rcarmo commented Nov 17, 2016

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.

@arrdem
Copy link

arrdem commented Nov 17, 2016

This is a PR which may be closed and succeeded. Please discuss the matter on the tracking ticket #908.

Kodiologist added a commit to Kodiologist/hy that referenced this pull request Nov 24, 2016
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.
@gilch gilch closed this Nov 27, 2016
@Kodiologist Kodiologist deleted the bool-spelling branch November 27, 2016 01:04
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

Successfully merging this pull request may close these issues.

6 participants