Re: [PHP-DEV] [Discussion] Deprecate function sizeof()

2015-03-09 Thread Pierre Joye
On Mar 10, 2015 2:41 PM, "Yasuo Ohgaki" wrote: > > Hi Pierre and all, > > On Tue, Mar 10, 2015 at 11:59 AM, Pierre Joye wrote: >> >> On Tue, Mar 10, 2015 at 1:48 PM, Xinchen Hui wrote: >> > Hey: >> > >> > On Tue, Mar 10, 2015 at 10:07 AM, Yasuo Ohgaki wrote: >> >> Hi Reeze, >> >> >> >> On Mon,

Re: [PHP-DEV] [Discussion] Deprecate function sizeof()

2015-03-09 Thread Yasuo Ohgaki
Hi Pierre and all, On Tue, Mar 10, 2015 at 11:59 AM, Pierre Joye wrote: > On Tue, Mar 10, 2015 at 1:48 PM, Xinchen Hui wrote: > > Hey: > > > > On Tue, Mar 10, 2015 at 10:07 AM, Yasuo Ohgaki > wrote: > >> Hi Reeze, > >> > >> On Mon, Mar 9, 2015 at 12:56 PM, reeze wrote: > >> > >>> It is a depr

Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC

2015-03-09 Thread Larry Garfield
On 03/09/2015 04:26 PM, Rowan Collins wrote: On 9 March 2015 09:43:32 GMT, Shawn McCool wrote: In order to access instance variables, one must use the `$this->` prefix. The problem with this is that it reduces expressiveness in the language and increases the amount of unnecessary decoration, r

Re: [PHP-DEV] [Discussion] Deprecate function sizeof()

2015-03-09 Thread Pierre Joye
On Tue, Mar 10, 2015 at 1:48 PM, Xinchen Hui wrote: > Hey: > > On Tue, Mar 10, 2015 at 10:07 AM, Yasuo Ohgaki wrote: >> Hi Reeze, >> >> On Mon, Mar 9, 2015 at 12:56 PM, reeze wrote: >> >>> It is a deprecated warning I won't break code I think. >>> >>> This could makes those project more maintain

Re: [PHP-DEV] [Discussion] Deprecate function sizeof()

2015-03-09 Thread Xinchen Hui
Hey: On Tue, Mar 10, 2015 at 10:07 AM, Yasuo Ohgaki wrote: > Hi Reeze, > > On Mon, Mar 9, 2015 at 12:56 PM, reeze wrote: > >> It is a deprecated warning I won't break code I think. >> >> This could makes those project more maintainable (new PHP programmer could >> be easier to maintain the code

Re: [PHP-DEV] [VOTE] [RFC] continue output buffering

2015-03-09 Thread Yasuo Ohgaki
Hi Mike, On Mon, Mar 9, 2015 at 9:45 PM, Michael Wallner wrote: > Hi, I’d like to start vote on RFC:continue_ob — any objections? > > https://wiki.php.net/rfc/continue_ob > > +1 I don't mind at all even if you fix this as simple bug fix :) Regards, -- Y

Re: [PHP-DEV] [Discussion] Deprecate function sizeof()

2015-03-09 Thread Yasuo Ohgaki
Hi Reeze, On Mon, Mar 9, 2015 at 12:56 PM, reeze wrote: > It is a deprecated warning I won't break code I think. > > This could makes those project more maintainable (new PHP programmer could > be easier to maintain the code without surprise), and it will be trivial to > fix this. We could move

Re: [PHP-DEV] Consistent function names

2015-03-09 Thread Yasuo Ohgaki
Hi Rowan, On Mon, Mar 9, 2015 at 7:42 AM, Rowan Collins wrote: > On 08/03/2015 01:15, Yasuo Ohgaki wrote: > >> >> On Sun, Mar 8, 2015 at 3:39 AM, Rowan Collins > > wrote: >> >> To an extent, yes. Part of the point that I and others are making >> is that th

Re: [PHP-DEV] Consistent function names

2015-03-09 Thread Yasuo Ohgaki
Hi Gregory, On Sun, Mar 8, 2015 at 7:03 PM, Grégory Planchat wrote: > Le 08/03/2015 00:44, Yasuo Ohgaki a écrit : > > Hi Gregory, >> >> On Sun, Mar 8, 2015 at 2:12 AM, Grégory Planchat wrote: >> >> Le 07/03/2015 02:39, Yasuo Ohgaki a écrit : >>> >>> We may provide new names and new parameter

Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC

2015-03-09 Thread Stanislav Malyshev
Hi! > as developing both Java and PHP, I would suggest a solution similar to > Java. As long as there is no conflict to a local variable the keyword > $this should be the default. "As long as" there is a key. There may be conflict, and unlike Java PHP's properties are dynamic. Java way is very

Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC

2015-03-09 Thread Stanislav Malyshev
Hi! >> The problem with this is that it reduces expressiveness in the >> language and increases the amount of unnecessary decoration, >> reducing readability. > > I disagree with this premise. The $this here is not just decorative > syntax, it's an actual variable, which can be passed around just

Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC

2015-03-09 Thread Johannes Ott
Hey as developing both Java and PHP, I would suggest a solution similar to Java. As long as there is no conflict to a local variable the keyword $this should be the default. Regards DerOetzi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/uns

Re: [PHP-DEV][RFC][DISCUSSION] Strict Argument Count

2015-03-09 Thread Marcio Almada
Hi, This is a remainder that the voting for the "Strict Argument Count" RFC is scheduled to start on March 14th, so we still have this week for discussion and it's still a good time to give feedback. Thanks, Márcio 2015-03-01 20:02 GMT-03:00 Marcio Almada : > Hi, internals > > I'm moving the "

Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC

2015-03-09 Thread Rowan Collins
On 9 March 2015 09:43:32 GMT, Shawn McCool wrote: >In order to access instance variables, one must use the `$this->` >prefix. >The problem with this is that it reduces expressiveness in the language >and >increases the amount of unnecessary decoration, reducing readability. I disagree with this

Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC

2015-03-09 Thread S.A.N
> Someone got an idea ? Simply arrows, without word "this" number = $number; } public function original() { return $->number; } public function addTo($amount) { return $->number + $amount; } } -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: htt

Re: [PHP-DEV] [RFC] Anonymous Classes

2015-03-09 Thread Philip Sturgeon
Matthew, On Sun, Mar 8, 2015 at 11:04 PM, Matthew Leverton wrote: >>> $foo = class extends Callback { ... } >>> $bar = new $foo; >> >> Nope, none of that. Wrap that in a function or clone it perhaps. >> > Are you actively against that functionality? (I don't think it's very > useful, but was wond

Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC

2015-03-09 Thread Benoit Schildnecht
Mike Dugan just told me § and £ aren't standard symbols, and he is right, I didn't have a picture of a standard keyboard when I proposed these symbols :( I don't know what could be used instead. Certainly a combination of symbols, but I can't find one. Someone got an idea ? Regards. ""Benoit

Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC

2015-03-09 Thread Benoit Schildknecht
Hi, I think your idea is good. Le Mon, 09 Mar 2015 15:11:01 +0100, Shawn McCool a écrit: There's a cultural disposition against re-purposing a symbol from one major version to the next. Let's consider that as fact and move on. If I wanted to provide syntactic sugar to replace a symbol w

[PHP-DEV] [RFC PRE-VOTE] Generator Delegation

2015-03-09 Thread Daniel Lowrey
Hi, internals! The Generator Delegation RFC has been updated significantly and marked as v0.2.0: https://wiki.php.net/rfc/generator-delegation There now exists a "final" patch and the proposed syntax has been changed from yield * to yield from I encourage all interested parties to

[PHP-DEV] [RFC VOTE] Generator Return Expressions

2015-03-09 Thread Daniel Lowrey
Hi, internals! I'd like to announce voting for the Generator Return Expressions RFC: https://wiki.php.net/rfc/generator-return-expressions#vote As this is a fairly concise and straightforward proposal the voting period will last only one week. A two-thirds majority is required for acceptance. I

Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC

2015-03-09 Thread Stelian Mocanita
On top of the cultural disposition, there is also the fact that things should not be removed from the language without deprecating them, so at best 7.0 would emit and E_DEPRECATED for the usage of "@". - Stelian On Mon, Mar 9, 2015 at 3:31 PM, Kalle Sommer Nielsen wrote: > Hi > > 2015-03-09 15:

Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC

2015-03-09 Thread Kalle Sommer Nielsen
Hi 2015-03-09 15:11 GMT+01:00 Shawn McCool : > I guess that if I thought that PHP would change its scoping, I would have > tried for that. Well take this code into consideration: A::c() will fail because the parameter $b conflicts with the property A::$b, but example works because the parameter

Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC

2015-03-09 Thread Shawn McCool
There's a cultural disposition against re-purposing a symbol from one major version to the next. Let's consider that as fact and move on. If I wanted to provide syntactic sugar to replace a symbol with $this-> so that our code can become more expressive if we choose to use it, how would you recomm

Re: [PHP-DEV] [PR] DateTime::createFromImmutable() method

2015-03-09 Thread Matthew Leverton
On Mon, Mar 9, 2015 at 5:35 AM, Derick Rethans wrote: > On Thu, 5 Mar 2015, Trevor Suarez wrote: > >> Good morning internals! >> >> I would like to propose a small addition be made to the DateTime class. >> >> https://github.com/php/php-src/pull/1145 > > When the factory method was added, we had t

Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC

2015-03-09 Thread Shawn McCool
I guess that if I thought that PHP would change its scoping, I would have tried for that. On Mon, Mar 9, 2015 at 3:11 PM, Mike Dugan wrote: > Why not use regular variable naming ($foo) and check the object for > accessible instance vars before looking for locally scoped vars? I’ve no > idea how

Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC

2015-03-09 Thread Shawn McCool
Sure, they should be separated into two equally impossible to pass RFCs. However, do you see a reasonable alternative way to achieve this type of improvement? On Mon, Mar 9, 2015 at 2:48 PM, Mike Dugan wrote: > Shawn & Stellan, > > (Apologies if this gets delivered twice, had to confirm myself o

Re: [PHP-DEV] About optimization for compiler

2015-03-09 Thread Dmitry Stogov
On Mon, Mar 9, 2015 at 3:52 PM, Bob Weinand wrote: > > Am 09.03.2015 um 11:24 schrieb Derick Rethans : > > > > On Fri, 27 Feb 2015, Xinchen Hui wrote: > > > >> Hey Internals: > >> > >> I was looking Bob's switch optimization.. > >> > >> then I start to worry about where is the place opt

Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC

2015-03-09 Thread Stelian Mocanita
Hi Shawn, My opinion is that even though the "@" operator should be deprecated in further along the line removed, it should not be repurposed for anything, it has too much legacy imho. While a shortcut might be a good idea, I personally favour the $this->var syntax just for muscle memory if nothi

Re: [PHP-DEV] About optimization for compiler

2015-03-09 Thread Bob Weinand
> Am 09.03.2015 um 11:24 schrieb Derick Rethans : > > On Fri, 27 Feb 2015, Xinchen Hui wrote: > >> Hey Internals: >> >> I was looking Bob's switch optimization.. >> >> then I start to worry about where is the place optimization should >> goes.. >> >> in generally, PHP is a int

Re: [PHP-DEV] About optimization for compiler

2015-03-09 Thread Dmitry Stogov
On Mar 9, 2015 1:24 PM, "Derick Rethans" wrote: > > On Fri, 27 Feb 2015, Xinchen Hui wrote: > > > Hey Internals: > > > > I was looking Bob's switch optimization.. > > > > then I start to worry about where is the place optimization should goes.. > > > > in generally, PHP is a int

[PHP-DEV] [VOTE] [RFC] continue output buffering

2015-03-09 Thread Michael Wallner
Hi, I’d like to start vote on RFC:continue_ob — any objections? https://wiki.php.net/rfc/continue_ob Regards, Mike

[PHP-DEV] Re: [VOTE] Exceptions in the engine

2015-03-09 Thread Dmitry Stogov
On Mar 8, 2015 9:26 PM, "Nikita Popov" wrote: > > On Mon, Feb 23, 2015 at 7:15 PM, Nikita Popov wrote: >> >> Hi internals! >> >> Voting on the engine exceptions RFC, which proposes to convert existing fatal and recoverable fatal errors into exceptions, has opened: >> >> https://wiki.php.net/r

Re: [PHP-DEV] [VOTE] Exceptions in the engine

2015-03-09 Thread Sebastian Bergmann
Am 09.03.2015 um 12:40 schrieb Dan Ackroyd: > So even though I hope we can clean up the exception hierarchy, merging > the engine exceptions is the right choice imo. Sounds reasonable to me. I'm wondering, though, whether we really need an additional RFC for the change I suggested as nobody spok

Re: [PHP-DEV] [VOTE] Exceptions in the engine

2015-03-09 Thread Dan Ackroyd
On 9 March 2015 at 11:04, David Zuelke wrote: > Why not wait with the merge until a consensus emerges regarding Throwable? The patch for engine exceptions is large - the longer that it is left unmerged, the more difficult it will be to do and people's time is valuable. It also delays finding bugs

Re: [PHP-DEV] [VOTE] Exceptions in the engine

2015-03-09 Thread Bob Weinand
> Am 09.03.2015 um 12:04 schrieb David Zuelke : > > Why not wait with the merge until a consensus emerges regarding Throwable? > > >> On 09.03.2015, at 05:26, Nikita Popov wrote: >> >> On Mon, Feb 23, 2015 at 7:15 PM, Nikita Popov wrote: >> >>> Hi internals! >>> >>> Voting on the engine exc

Re: [PHP-DEV] [VOTE] Exceptions in the engine

2015-03-09 Thread David Zuelke
Why not wait with the merge until a consensus emerges regarding Throwable? > On 09.03.2015, at 05:26, Nikita Popov wrote: > > On Mon, Feb 23, 2015 at 7:15 PM, Nikita Popov wrote: > >> Hi internals! >> >> Voting on the engine exceptions RFC, which proposes to convert existing >> fatal and rec

Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC

2015-03-09 Thread reeze
Hi, On 9 March 2015 at 17:43, Shawn McCool wrote: > I've never submitted an RFC. Whether or not you're interested in the > feature, please consider giving me feedback on the RFC itself so that I can > better understand how to succeed in the process. > > == PHP RFC: Instance Variable Sugar ==

Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC

2015-03-09 Thread Jacob Bednarz
Hey Shane, The @ symbol in PHP is currently an error control operator[1]. Does that mean you will be reassigning the error control operator to another character? [1]: http://php.net/manual/en/language.operators.errorcontrol.php On Monday, March 9, 2015, Shawn McCool wrote: > I've never submitte

[PHP-DEV] Request Feedback for Instance Variable Sugar RFC

2015-03-09 Thread Shawn McCool
I've never submitted an RFC. Whether or not you're interested in the feature, please consider giving me feedback on the RFC itself so that I can better understand how to succeed in the process. == PHP RFC: Instance Variable Sugar == * Version: 0.1 * Date: 2015-03-09 * Author: Shawn M

Re: [PHP-DEV] [PR] DateTime::createFromImmutable() method

2015-03-09 Thread Derick Rethans
On Thu, 5 Mar 2015, Trevor Suarez wrote: > Good morning internals! > > I would like to propose a small addition be made to the DateTime class. > > https://github.com/php/php-src/pull/1145 When the factory method was added, we had this same discussion. And the discussions lead to the conclusion

Re: [PHP-DEV] About optimization for compiler

2015-03-09 Thread Derick Rethans
On Fri, 27 Feb 2015, Xinchen Hui wrote: > Hey Internals: > > I was looking Bob's switch optimization.. > > then I start to worry about where is the place optimization should > goes.. > > in generally, PHP is a interpreted language. IMO, it should > compiler the PHP codes to

Re: [PHP-DEV][RFC][VOTING] Context Sensitive Lexer

2015-03-09 Thread Sebastian Bergmann
Am 09.03.2015 um 09:44 schrieb Matteo Beccati: > I like the approach. I'm no lexer expert but the new PR seems much nicer. > Moreover, I like the feature itself but previously voted no on the > implementation. I've therefore switched my vote to a "yes". Dito. -- PHP Internals - PHP Runtime Deve

Re: [PHP-DEV][RFC][VOTING] Context Sensitive Lexer

2015-03-09 Thread Matteo Beccati
Hi Marcio, Just passing by to announce I already have a working version of the new patch: https://github.com/php/php-src/pull/1158 The patch is 100% compatible with the proposed one with the advantages: - Has no regression or forward compatibility risks and is highly predictable -