rfc:println

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
rfc:println [2021/03/13 19:46] tandrerfc:println [2021/03/13 20:01] tandre
Line 205: Line 205:
  
 My reasons for unconditionally choosing the Unix newline are documented in the section [[#the_unix_newline_is_always_used|The Unix Newline is always used]]. My reasons for unconditionally choosing the Unix newline are documented in the section [[#the_unix_newline_is_always_used|The Unix Newline is always used]].
 +
 +==== Should this be a language construct instead ====
 +
 +<blockquote>
 +Should't this be a language construct instead of a function, so it can be used without parenthesis just like echo or print?
 +
 +It would feel a little weird being able to do:
 +
 +<code php>
 +echo 'hello world';
 +print 'hello world';
 +</code>
 +... but not:
 +
 +<code php>
 +puts 'hello world';
 +</code>
 +</blockquote>
 +
 +Adding this as a language construct (i.e. new statement type) is something I'd expect to be contentious, and this is deliberately NOT done. Adding a new keyword would
 +
 +1. Cause a larger BC break.
 +2. 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.
 +3. Be impossible to polyfill (when brackets weren't added) for older php versions.
  
 ===== Proposed Voting Choices ===== ===== Proposed Voting Choices =====
rfc/println.txt · Last modified: 2021/03/15 13:26 by tandre