Re: [PHP-DEV] RFC: Traits for PHP

2008-02-21 Thread Max Antonov
+1 Thanks for very detailed proposal. I think "Traits for PHP" is good idea. But I think, that "use" keword make some confusing, I propose "have" or "hold" instead. And "!" not readable (imho) - I'd like "not" or "except" And aliasing syntax (bar=>foo) looks good in my mind. -- PHP Internals -

Re: [PHP-DEV] [RFC] Square brackets shortcut

2008-01-11 Thread Max Antonov
a) Commit square bracket array shortcut patch keys and values are separated by colons. ( http://www.opendogs.org/pub/php-5.3dev-080109-sbar.patch ) e.g. $a = [1, 2, 3]; $b = ['foo': 'orange', 'bar': 'apple', 'baz': 'lemon']; Breaks from PHP's => for no apparent reason (one charact

[PHP-DEV] Re: Array syntax []

2008-01-11 Thread Max Antonov
Johannes Schlüter writes: The last line is exactly why I won't like such a syntax. Just consider the a bit worse call like foo([1, $a[2]]); I might even construct worse examples, is this a good-readable code? foo (array('a'=2,'b'=>array('x'=>5,'c'=>array(1,4,2)),'n'=>$bar[4])); what diffe

[PHP-DEV] Re: Array syntax []

2008-01-11 Thread Max Antonov
I use PHP since version 5.0 release I'd like use this syntax $a = [ 2,6,9 ]; $b = ['a'=>1 , 'v'=>'string']; foo(['bar'=>2, 'test'=null]); Andi Gutmans пишет: Andi 2003: http://www.mail-archive.com/internals@lists.php.net/msg03896.html Andi's brain evolves 2007: http://marc.info/?l=php-inter