Re: [PHP-DEV] Request for Comments: Horizontal Reuse for PHP

2009-10-14 Thread Victor Bolshov
Personally, I don't get deep into how PHP works inside, I'm just a PHP-programmer (the man from userland). For me it will surely be better to use 'insteadof', not 'instead'. And It seems to me more natural to use the following syntax when using grafts: class Foo { use MyGraft { public graftedCl

Re: [PHP-DEV] Request for Comments: Horizontal Reuse for PHP

2009-10-14 Thread Tom Boutell
I'm very concerned about the practical consequences of introducing traits without state. Lacking support for properties (state) in traits, programmers will immediately start hacking properties in anyway. I see two approaches: A. They could do this using static hashes in global variables or a sep

Re: [PHP-DEV] Request for Comments: Horizontal Reuse for PHP

2009-10-14 Thread Lukas Kahwe Smith
On 14.10.2009, at 22:03, Stanislav Malyshev wrote: Hi! So lets warm this up again. HEAD is for development .. so lets get this into HEAD so that it will be part of the next bigger PHP release for sure! Well, the code is sitting here http://github.com/gron/php-src/tree/PHP_6-traits and wait

Re: [PHP-DEV] Request for Comments: Horizontal Reuse for PHP

2009-10-14 Thread Stanislav Malyshev
Hi! So lets warm this up again. HEAD is for development .. so lets get this into HEAD so that it will be part of the next bigger PHP release for sure! Well, the code is sitting here http://github.com/gron/php-src/tree/PHP_6-traits and waits to be merged. :) I thought before merging code i

Re: [PHP-DEV] Request for Comments: Horizontal Reuse for PHP

2009-10-14 Thread Stefan Marr
On 14 Oct 2009, at 21:26, Lukas Kahwe Smith wrote: So lets warm this up again. HEAD is for development .. so lets get this into HEAD so that it will be part of the next bigger PHP release for sure! Well, the code is sitting here http://github.com/gron/php-src/tree/PHP_6-traits and waits to

Re: [PHP-DEV] Request for Comments: Horizontal Reuse for PHP

2009-10-14 Thread Lukas Kahwe Smith
Aloha, So lets warm this up again. HEAD is for development .. so lets get this into HEAD so that it will be part of the next bigger PHP release for sure! regards, Lukas On 13.10.2008, at 21:12, Stefan Marr wrote: Hello, the last time the topic traits has been discussed is already a while

[PHP-DEV] Re: Creating an experimental syntax

2009-10-14 Thread Rune Kaagaard
Dear Etienne Wauw did not know Backus–Naur Form before. That looks like a great first step. Thx for showing me that! Cheers Rune Kaagaard Denmark -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Creating an experimental syntax

2009-10-14 Thread Rune Kaagaard
Dear Etienne Wauw did not know Backus–Naur Form before. That looks like a great first step. Thx for showing me that! Cheers Rune Kaagaard Denmark On 10/14/09, Etienne Kneuss wrote: > Hello, > > On Wed, Oct 14, 2009 at 1:37 PM, Etienne Kneuss wrote: >> Hello, >> >> one problem that immediately

Re: [PHP-DEV] Re: Creating an experimental syntax

2009-10-14 Thread Etienne Kneuss
Hello, On Wed, Oct 14, 2009 at 1:37 PM, Etienne Kneuss wrote: > Hello, > > one problem that immediately pops out is that you have a parsing > ambiguity between an argument list and a concatenation of strings as a > single argument. > > You should start by producing a BFN version of your desired g

Re: [PHP-DEV] Re: Creating an experimental syntax

2009-10-14 Thread Etienne Kneuss
Hello, one problem that immediately pops out is that you have a parsing ambiguity between an argument list and a concatenation of strings as a single argument. You should start by producing a BFN version of your desired grammar. Such errors should then be more apparent. Best, On Wed, Oct 14, 20

[PHP-DEV] Re: Creating an experimental syntax

2009-10-14 Thread Rune Kaagaard
Dear internals I'm slowly getting to know more about bison and language parsing. A new world for me. But progress is still slow. I have made an example of the syntax I am looking to achieve at http://code.google.com/p/php-alternative-syntax/ . If any of you c gurus could help me with the best meth

[PHP-DEV] Experience Report about Traits at the BBC

2009-10-14 Thread Stefan Marr
Hello internals: This might interest you, it is a report on Traits, or Roles as they are named in Perl, applied to a real-world application at the the BBC. A slide set: http://www.slideshare.net/Ovid/inheritance-versus-roles and a more extensive writeup: http://www.slideshare.net/Ovid/inh