Re: [PHP-DEV] nowdocs again

2008-02-08 Thread Markus Fischer
Hi, chris# wrote: $var = [[[HERE Is just another idea HERE I don't like it because this easily breaks editors detecting of starting/ending brackets. Advanced editors allow jumping forth/back between start/ending brackets and this would break it. - Markus -- PHP Internals - PHP Runtime Dev

Re: [PHP-DEV] nowdocs again

2008-02-07 Thread chris#
On Wed, 30 Jan 2008 11:59:42 -0800, Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: > Greg Beaver wrote: >> Dmitry Stogov wrote: >>> The feature is very useful, however, I agree, the syntax would be >>> better. :) >>> The current syntax: >>> >>> $var = <<<'TEXT' >>> text >>> TEXT; >> >> I would like to

Re: [PHP-DEV] nowdocs again

2008-01-31 Thread Wietse Venema
Stefan Walk: [ Charset ISO-8859-1 unsupported, converting... ] > On Wednesday 30 January 2008 20:52:40 Stanislav Malyshev wrote: > > > I don't think the 'FOO' syntax is very obvious either, but I can't think > > > of a better one and if there isn't a commonly known syntax we can steal > > > from an

Re: [PHP-DEV] nowdocs again

2008-01-31 Thread Stefan Walk
On Wednesday 30 January 2008 20:52:40 Stanislav Malyshev wrote: > > I don't think the 'FOO' syntax is very obvious either, but I can't think > > of a better one and if there isn't a commonly known syntax we can steal > > from another language, then making up our own, no matter what it is, is > > We

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Gregory Beaver
Markus Fischer wrote: > Hi, > > Andi Gutmans wrote: >> I think if the syntax is confusing we can go for just a single quote as >> part of the operator which doesn't make it look like just another plain >> old string, e.g.: >> >> $bar =<<<'FOO > > Such a thing is not nice for casual string syntax

RE: [PHP-DEV] nowdocs again

2008-01-30 Thread Andi Gutmans
rnals > Subject: Re: [PHP-DEV] nowdocs again > > Hi, > > Andi Gutmans wrote: > > I think if the syntax is confusing we can go for just a single quote > as > > part of the operator which doesn't make it look like just another > plain > > old string, e.g.:

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Stanislav Malyshev
Such a thing is not nice for casual string syntax highlighting in editors. Needs a special rule to handle an opening but not closing single quote .. mhmmm :/ I think for 'FOO' syntax it should be pretty easy to fix the highlighter - e.g. just add quote processing to the rule that does <<<. --

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Markus Fischer
Hi, Andi Gutmans wrote: I think if the syntax is confusing we can go for just a single quote as part of the operator which doesn't make it look like just another plain old string, e.g.: $bar =<<<'FOO Such a thing is not nice for casual string syntax highlighting in editors. Needs a special r

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Antony Dovgal
On 31.01.2008 00:06, Andi Gutmans wrote: > I think it's actually pretty useful and not that uncommon to have large > chunks of text which you want to capture in a variable (and not deal > with the shortcomings of single quotes and/or output buffering in those > instances). Does this work for you?

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Keryx Web
Andi Gutmans skrev: I think if the syntax is confusing we can go for just a single quote as part of the operator which doesn't make it look like just another plain old string, e.g.: $bar =<<<'FOO Sdjfslk Sdfkj FOO; +1/2 Once again thinking as a teacher... Just a few weeks into my last course

RE: [PHP-DEV] nowdocs again

2008-01-30 Thread Andi Gutmans
, e.g.: $bar =<<<'FOO Sdjfslk Sdfkj FOO; Andi > -Original Message- > From: Antony Dovgal [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 30, 2008 10:51 AM > To: Stas Malyshev > Cc: 'PHP Internals' > Subject: Re: [PHP-DEV] nowdocs again >

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Stanislav Malyshev
I don't think the 'FOO' syntax is very obvious either, but I can't think of a better one and if there isn't a commonly known syntax we can steal from another language, then making up our own, no matter what it is, is We can steal from perl, which has exactly 'FOO' ;) -- Stanislav Malyshev, Zen

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Rasmus Lerdorf
Greg Beaver wrote: Dmitry Stogov wrote: The feature is very useful, however, I agree, the syntax would be better. :) The current syntax: $var = <<<'TEXT' text TEXT; I would like to see nowdocs. The closest equivalent in another syntax I can think of is xml's CDATA. Perhaps we can borrow s

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Greg Beaver
Dmitry Stogov wrote: The feature is very useful, however, I agree, the syntax would be better. :) The current syntax: $var = <<<'TEXT' text TEXT; I would like to see nowdocs. The closest equivalent in another syntax I can think of is xml's CDATA. Perhaps we can borrow something similar to

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Adam Maccabee Trachtenberg
On Wed, 30 Jan 2008, Stanislav Malyshev wrote: > > Also looking at the discussion, I can see only 6 people involved > > (including Dmitry), which most likely means nobody is really > > interested in that "nowdoc" and this is yet another reason not to > > add it. > > I don't see how 'foo' is anythi

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Stanislav Malyshev
Also looking at the discussion, I can see only 6 people involved (including Dmitry), which most likely means nobody is really interested in that "nowdoc" and this is yet another reason not to add it. I don't see how 'foo' is anything but obvious to anybody that gives himself a second to actual

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Stanislav Malyshev
$string = 'it\'s not that hard to add a $slash'; It's not too hard to add a slash unless you have to do it in a big chunk of text that may contain quotes, slashes, etc. - e.g. random PHP code for a template generation. Going over it each time is sure recipe for errors, and is very annoying. H

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Antony Dovgal
On 30.01.2008 21:40, Stanislav Malyshev wrote: > Waiting for "better syntax" when there's nobody willing to actually work on > this > syntax is just another way to say "kill it". "Nobody willing to actually work on this" effectively means "nobody actually needs it". -- Wbr, Antony Dovgal -

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Antony Dovgal
On 30.01.2008 21:38, Stanislav Malyshev wrote: >> $string = 'it\'s not that hard to add a $slash'; > > It's not too hard to add a slash unless you have to do it in a big chunk > of text that may contain quotes, slashes, etc. - e.g. random PHP code > for a template generation. Templates are usua

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Antony Dovgal
On 30.01.2008 17:46, Richard Quadling wrote: > As we may be missing a trick, how do you create strings which have $ > and ' and " in them? $string = 'it\'s not that hard to add a $slash'; or $string = <

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Dmitry Stogov
The feature is very useful, however, I agree, the syntax would be better. :) The current syntax: $var = <<<'TEXT' text TEXT; Thanks. Dmitry. Antony Dovgal wrote: On 30.01.2008 16:41, Dmitry Stogov wrote: The final nowdoc patches are attached. I'm going to commit them on Thursday in case of n

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Richard Quadling
On 30/01/2008, Antony Dovgal <[EMAIL PROTECTED]> wrote: > On 30.01.2008 17:19, Pierre Joye wrote: > >> I believe it's far from readable and clear and I suggest not to add it > >> until > >> we have a better syntax. > > > > What do you suggest? :) > > I suggest to wait until we find a better syntax

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Jochem Maas
Pierre Joye schreef: On Jan 30, 2008 3:00 PM, Antony Dovgal <[EMAIL PROTECTED]> wrote: On 30.01.2008 16:41, Dmitry Stogov wrote: The final nowdoc patches are attached. I'm going to commit them on Thursday in case of no objections. So the current syntax is $var = <<<'TEXT' text 'TEXT'; am I r

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Antony Dovgal
On 30.01.2008 17:19, Pierre Joye wrote: >> I believe it's far from readable and clear and I suggest not to add it until >> we have a better syntax. > > What do you suggest? :) I suggest to wait until we find a better syntax. I do not suggest any syntax myself because I do not see any need in this

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Pierre Joye
On Jan 30, 2008 3:00 PM, Antony Dovgal <[EMAIL PROTECTED]> wrote: > On 30.01.2008 16:41, Dmitry Stogov wrote: > > The final nowdoc patches are attached. > > I'm going to commit them on Thursday in case of no objections. > > So the current syntax is > > $var = <<<'TEXT' > text > 'TEXT'; > > am I rig

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Antony Dovgal
On 30.01.2008 16:41, Dmitry Stogov wrote: > The final nowdoc patches are attached. > I'm going to commit them on Thursday in case of no objections. So the current syntax is $var = <<<'TEXT' text 'TEXT'; am I right? I believe it's far from readable and clear and I suggest not to add it until we

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Dmitry Stogov
The final nowdoc patches are attached. I'm going to commit them on Thursday in case of no objections. Thanks. Dmitry. Stanislav Malyshev wrote: Hi all! I remember the topic of 'nowdocs' (if you don't remember what it is, read on) was already discussed, but nothing really happened about it. F

Re: [PHP-DEV] nowdocs again

2008-01-21 Thread Wez Furlong
+1, using 'END' as the syntax. The ~ version to me implies some kind of bit-flipping operation, whereas the single quotes remind us that interpolation doesn't happen. --Wez. On Jan 18, 2008, at 4:07 PM, Stanislav Malyshev wrote: Hi all! I remember the topic of 'nowdocs' (if you don't remem

Re: [PHP-DEV] nowdocs again

2008-01-21 Thread Geoffrey Sneddon
On 21 Jan 2008, at 13:24, Hannes Magnusson wrote: On Jan 18, 2008 10:07 PM, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: Hi all! I remember the topic of 'nowdocs' (if you don't remember what it is, read on) was already discussed, but nothing really happened about it. For those who just recen

Re: [PHP-DEV] nowdocs again

2008-01-21 Thread Pierre
On Jan 21, 2008 2:24 PM, Hannes Magnusson <[EMAIL PROTECTED]> wrote: > > Any objections to this? > > No. +1 from me. +1 -- Pierre http://blog.thepimp.net | http://www.libgd.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] nowdocs again

2008-01-21 Thread Hannes Magnusson
On Jan 18, 2008 10:07 PM, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > Hi all! > > I remember the topic of 'nowdocs' (if you don't remember what it is, > read on) was already discussed, but nothing really happened about it. > For those who just recently woke up from cryogenic sleep :), "nowdocs"