rfc:println
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
rfc:println [2021/03/13 19:29] – tandre | rfc:println [2021/03/13 20:03] – tandre | ||
---|---|---|---|
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' | ||
===== Proposed Voting Choices ===== | ===== Proposed Voting Choices ===== | ||
- | Yes/No, requiring 2/3 majority. | + | Yes/No, requiring |
===== References ===== | ===== References ===== | ||
https:// | https:// | ||
+ | https:// |
rfc/println.txt · Last modified: 2021/03/15 13:26 by tandre