rfc:println
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:println [2021/03/13 19:32] – tandre | rfc:println [2021/03/15 13:26] (current) – tandre | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2021-03-13 | * Date: 2021-03-13 | ||
* Author: Tyson Andre | * Author: Tyson Andre | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
* Implementation: | * Implementation: | ||
Line 196: | Line 196: | ||
(e.g. changing '' | (e.g. changing '' | ||
+ | |||
+ | ==== Choice of Unix newline(\n) ==== | ||
+ | |||
+ | Some programming languages such as Java use a platform-specific or configurable newline https:// | ||
+ | Others, such as rust and golang, always use a unix newline. | ||
+ | |||
+ | There have been some comments in favor of Unix newlines, and other comments in favor of PHP_EOL or configurable settings - e.g. https:// | ||
+ | |||
+ | My reasons for unconditionally choosing the Unix newline are documented in the section [[# | ||
+ | |||
+ | ==== Should this be a language construct instead ==== | ||
+ | |||
+ | |||
+ | https:// | ||
+ | |||
+ | < | ||
+ | Should' | ||
+ | |||
+ | It would feel a little weird being able to do: | ||
+ | |||
+ | <code php> | ||
+ | echo 'hello world'; | ||
+ | print 'hello world'; | ||
+ | </ | ||
+ | ... but not: | ||
+ | |||
+ | <code php> | ||
+ | puts 'hello world'; | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Adding this as a language construct (i.e. new statement type) is something I'd expect to be contentious, | ||
+ | |||
+ | - Cause a larger BC break. | ||
+ | - Increase the complexity of the language specification and make the language a bit harder to learn; I'd prefer simplicity by using an ordinary global function in this case. | ||
+ | - Be impossible to polyfill (when brackets weren' | ||
+ | |||
+ | ==== PHP already has a lot of ways to print a string ==== | ||
+ | |||
+ | https:// | ||
+ | |||
+ | < | ||
+ | This isn't solving any problem that anyone is actually having. | ||
+ | Yes, that includes you. You're not having this problem because it doesn' | ||
+ | exist. | ||
+ | |||
+ | We already have twice as many ways to output a string as any language needs | ||
+ | and you want to add another because you'd rather type " | ||
+ | Hard, negative ten thousand no on this. | ||
+ | This is genuinely absurd. | ||
+ | </ | ||
===== Proposed Voting Choices ===== | ===== Proposed Voting Choices ===== | ||
- | Yes/No, requiring 2/3 majority. | + | Yes/No, requiring |
===== References ===== | ===== References ===== | ||
https:// | https:// | ||
- | https:// | + | https:// |
rfc/println.1615663949.txt.gz · Last modified: 2021/03/13 19:32 by tandre