[PHP-DEV] Multiple use of ast node in parser

2018-10-17 Thread Christian Schneider
I'm playing around with some syntactic sugar for PHP and when trying to implement :$foo as equivalent for 'foo' => $foo I ran into the problem of having only having one ast node but trying to use it twice. My first attempt was | ':' T_VARIABLE { $$ =

Re: [PHP-DEV] multiple use

2008-06-02 Thread Mark van der Velden
Hannes Magnusson wrote: On Sun, Jun 1, 2008 at 7:43 PM, Stanislav Malyshev [EMAIL PROTECTED] wrote: Hi! use FooBar::In::Some::NameSpace as foo, SomeOther::Cool:Massive::awesome::space as bar, And::other:namespace as foobar; vs use FooBar::In::Some::NameSpace as foo; use

Re: [PHP-DEV] multiple use

2008-06-02 Thread Stefan Walk
On Sunday 01 June 2008 23:32:58 Hannes Magnusson wrote: I don't know what else I can say. You asked if someone had objections and I replied stating my personal opinion that I find explicit use statements in multiple lines more readable. I don't really see the point in dropping three characters

Re: [PHP-DEV] multiple use

2008-06-02 Thread Derick Rethans
On Sun, 1 Jun 2008, Hannes Magnusson wrote: On Sun, Jun 1, 2008 at 7:43 PM, Stanislav Malyshev [EMAIL PROTECTED] wrote: Hi! use FooBar::In::Some::NameSpace as foo, SomeOther::Cool:Massive::awesome::space as bar, And::other:namespace as foobar; vs use FooBar::In::Some::NameSpace as

Re: [PHP-DEV] multiple use

2008-06-02 Thread Stanislav Malyshev
Hi! It's not dropping three characters, it's making better user experience. I see lately on the list very strange total opposition to any feature that adds any usability or syntax sugar to PHP. Like features supported by a bunch of community people but opposed by some core developers on

Re: [PHP-DEV] multiple use

2008-06-02 Thread Pierre Joye
hi, On Mon, Jun 2, 2008 at 10:26 AM, Stanislav Malyshev [EMAIL PROTECTED] wrote: Hi! I wonder why is that? Conservatism (and we are all conservative depending on what you ask...sadly) What's wrong with being nicer to the user? nothing Is usability a taboo in PHP now? no +1 for this

[PHP-DEV] multiple use

2008-06-01 Thread Stanislav Malyshev
Hi! Attached is the patch that implements multiple elements in use statement, like this: use foo::bar as baz, foo::baz as bazbaz; Any objections to it? -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED] Index:

Re: [PHP-DEV] multiple use

2008-06-01 Thread Kalle Sommer Nielsen
: Sunday, June 01, 2008 6:09 PM Subject: [PHP-DEV] multiple use Hi! Attached is the patch that implements multiple elements in use statement, like this: use foo::bar as baz, foo::baz as bazbaz; Any objections to it? -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http

Re: [PHP-DEV] multiple use

2008-06-01 Thread Hannes Magnusson
On Sun, Jun 1, 2008 at 6:09 PM, Stanislav Malyshev [EMAIL PROTECTED] wrote: Hi! Attached is the patch that implements multiple elements in use statement, like this: use foo::bar as baz, foo::baz as bazbaz; Any objections to it? Yes. I find the whole namespace issue complicated enough as

Re: [PHP-DEV] multiple use

2008-06-01 Thread Stanislav Malyshev
Hi! I find the whole namespace issue complicated enough as it is. importing multiple namespaces and aliasing various classess/functions all in one line decreases the readability imo. I must say I fail to understand how it's decreasing readability. Is function foo($a, $b, $c) hard to read? Is

Re: [PHP-DEV] multiple use

2008-06-01 Thread Hannes Magnusson
On Sun, Jun 1, 2008 at 7:11 PM, Stanislav Malyshev [EMAIL PROTECTED] wrote: Hi! I find the whole namespace issue complicated enough as it is. importing multiple namespaces and aliasing various classess/functions all in one line decreases the readability imo. I must say I fail to understand

Re: [PHP-DEV] multiple use

2008-06-01 Thread Stanislav Malyshev
Hi! use FooBar::In::Some::NameSpace as foo, SomeOther::Cool:Massive::awesome::space as bar, And::other:namespace as foobar; vs use FooBar::In::Some::NameSpace as foo; use SomeOther::Cool:Massive::awesome::space as bar; use And::other:namespace as foobar; Well, with (im)proper formatting many

RE: [PHP-DEV] multiple use

2008-06-01 Thread Michael Robinson
From: Stanislav Malyshev wrote: Hi! Attached is the patch that implements multiple elements in use statement, like this: use foo::bar as baz, foo::baz as bazbaz; Any objections to it? A very nice addition. I have use for this. Two thumbs up. :) Best Regards Mike Robinson -- PHP

Re: [PHP-DEV] multiple use

2008-06-01 Thread Hannes Magnusson
On Sun, Jun 1, 2008 at 7:43 PM, Stanislav Malyshev [EMAIL PROTECTED] wrote: Hi! use FooBar::In::Some::NameSpace as foo, SomeOther::Cool:Massive::awesome::space as bar, And::other:namespace as foobar; vs use FooBar::In::Some::NameSpace as foo; use SomeOther::Cool:Massive::awesome::space as