Re: [PHP-DEV] RFC - Array slice syntactic sugar

2015-03-20 Thread Vik Hudec
Alex, On Fri, 2015-03-20, at 17:19, Alex Bowers wrote: > When you say restrict to one each. Do you mean one for strings and one for > arrays? Yes, that's what I mean. I would propose square brackets for array offsets, and curly braces for strings. > If so I'd have to disagree with this, since h

Re: [PHP-DEV] RFC - Array slice syntactic sugar

2015-03-20 Thread Vik Hudec
Hi Alex, On Fri, 2015-03-20, at 14:52, Alex Bowers wrote: > But I don't think we should only match {} for strings and [] for arrays, > that seems broken to me. > Maybe you misunderstand me, I am against using two syntaxes for different > things. Based on your reply; yes, I'm definitely misunder

Re: [PHP-DEV] RFC - Array slice syntactic sugar

2015-03-20 Thread Vik Hudec
Hi Alex, On Fri, 2015-03-20, at 13:38, Alex Bowers wrote: > But I don't think we should only match {} for strings and [] for arrays, > that seems broken to me. Certainly it breaks BC (and would presumably have to wait until PHP 8), but if we were starting from scratch today, why would it make se

Re: [PHP-DEV] RFC - Array slice syntactic sugar

2015-03-20 Thread Vik Hudec
Hi Rowan, On Fri, 2015-03-20, at 13:17, Rowan Collins wrote: > I personally like the idea of string offsets having similar but slightly > different syntax from array offsets, to make clear which you're using. I > use {} instead of [] for that reason, but at the moment the syntaxes are > comple

Re: [PHP-DEV] Inconsistencies in callable, call_user_func and direct variable calls

2015-03-19 Thread Vik Hudec
I've always liked how callbacks (well, function pointers) are handled in C - using the function name without parentheses. eg. $a = $object->method; But this wouldn't work in PHP as is, since property and method names would collide. How do people feel about the fact that we have separate propert