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

Newline is redundant #132

Closed
Maltysen opened this issue Jul 24, 2015 · 4 comments
Closed

Newline is redundant #132

Maltysen opened this issue Jul 24, 2015 · 4 comments

Comments

@Maltysen
Copy link
Contributor

The newline is meant to allow separation that does not suppress input by forcing print outside of a expression. Like 3\n4. However, the new print function makes this redundant because it always forces a print. So the above is equivalent to 3p4.

Any ideas what to do with newline?

@jakobkogler
Copy link
Contributor

It allows creating strings with newlines in it. Instead of "a\nb", you
can write "a<newline>b". Saves on byte. But it's not used very often.
On Jul 24, 2015 10:24 PM, "Maltysen" notifications@github.com wrote:

The newline is meant to allow separation that does not suppress input by
forcing print outside of a expression. Like 3\n4. However, the new print
function makes this redundant because it always forces a print. So the
above is equivalent to 3p4.

Any ideas what to do with newline?


Reply to this email directly or view it on GitHub
#132.

@Maltysen
Copy link
Contributor Author

@jakobkogler Even if we change newline to be something else, that would still work since its inside a string. I'm talking about its use as an operator.

@isaacg1
Copy link
Owner

isaacg1 commented Jul 24, 2015

Those aren't actually equivalent - one has a trailing newline, the other doesn't.
Compare: https://pyth.herokuapp.com/?code=3%0A4%5Ca&debug=0 and https://pyth.herokuapp.com/?code=3p4%5Ca&debug=0
That being said, we could probably find something more useful for it.

@isaacg1
Copy link
Owner

isaacg1 commented Aug 29, 2015

Without any ideas for what to do on newline, I'm closing this.

@isaacg1 isaacg1 closed this as completed Aug 29, 2015
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

3 participants