Re: [PHP-DEV] [RFC] Loosening heredoc/nowdoc scanner

2014-08-31 Thread Florian Anderiasch
On 30.08.2014 23:26, Robert Williams wrote: > If the syntax of heredocs/nowdocs is to be loosened, the biggest aspect I’d > like to see addressed is indentation. I can certainly see how it would be > nice to loosen the restrictions around the post-closing-token newline to > allow easier use in p

Re: [PHP-DEV] [RFC] Loosening heredoc/nowdoc scanner

2014-08-30 Thread Tjerk Meesters
On 31 Aug, 2014, at 6:12 am, Stas Malyshev wrote: > Hi! > >> There’s no real objective measure with which I can answer such >> questions :) >> >> The closest I could come to a rebuttal is if there’s no real need to >> make the syntax so restrictive, why not make it less restrictive? > > "Why

Re: [PHP-DEV] [RFC] Loosening heredoc/nowdoc scanner

2014-08-30 Thread Rowan Collins
On 30/08/2014 22:26, Robert Williams wrote: function foo() { $string = <<< THEEND This is the document text. Any whitespace appearing in a column that’s before the starting token is automatically ignored for all lines. THEEND; I like this idea,

Re: [PHP-DEV] [RFC] Loosening heredoc/nowdoc scanner

2014-08-30 Thread Stas Malyshev
Hi! > There’s no real objective measure with which I can answer such > questions :) > > The closest I could come to a rebuttal is if there’s no real need to > make the syntax so restrictive, why not make it less restrictive? "Why not" is usually not a very good reason for a change in the languag

Re: [PHP-DEV] [RFC] Loosening heredoc/nowdoc scanner

2014-08-30 Thread Robert Williams
If the syntax of heredocs/nowdocs is to be loosened, the biggest aspect I’d like to see addressed is indentation. I can certainly see how it would be nice to loosen the restrictions around the post-closing-token newline to allow easier use in places like array definitions, but, I’ve never run in

Re: [PHP-DEV] [RFC] Loosening heredoc/nowdoc scanner

2014-08-30 Thread Crypto Compress
Hi, Manual: "Also, the identifier must follow the same naming rules as any other label in PHP: it must contain only alphanumeric characters and underscores, and must start with a non-digit character or underscore." RFC: "Ends a quotation when the closing identifier is followed by a newline o

Re: [PHP-DEV] [RFC] Loosening heredoc/nowdoc scanner

2014-08-30 Thread Johannes Schlüter
On Sat, 2014-08-30 at 18:33 +0800, Tjerk Meesters wrote: > > The closest I could come to a rebuttal is if there’s no real need to > make the syntax so restrictive, why not make it less restrictive? > This is a good criterion when adding a new syntax. A change to existing syntax features needs fur

Re: [PHP-DEV] [RFC] Loosening heredoc/nowdoc scanner

2014-08-30 Thread Nikita Popov
On Sat, Aug 30, 2014 at 2:33 AM, Tjerk Meesters wrote: > Hi internals, > > I would like to propose a few changes to our heredoc / nowdoc scanner to > make it less awkward to use inside other constructs. > > https://wiki.php.net/rfc/heredoc-scanner-loosening > > Let me know your thoughts :) > +1

Re: [PHP-DEV] [RFC] Loosening heredoc/nowdoc scanner

2014-08-30 Thread Tjerk Meesters
Hi Stas, On 30 Aug, 2014, at 2:08 pm, Stas Malyshev wrote: > Hi! > >> I would like to propose a few changes to our heredoc / nowdoc scanner to >> make it less awkward to use inside other constructs. >> >> https://wiki.php.net/rfc/heredoc-scanner-loosening >> >> Let me know your thoughts :) >

Re: [PHP-DEV] [RFC] Loosening heredoc/nowdoc scanner

2014-08-29 Thread Stas Malyshev
Hi! > I would like to propose a few changes to our heredoc / nowdoc scanner to make > it less awkward to use inside other constructs. > > https://wiki.php.net/rfc/heredoc-scanner-loosening > > Let me know your thoughts :) With this proposal, you will not be able to use the delimiter inside the