Re: [PHP-DEV] [RFC] Readonly Properties

2014-10-24 Thread Andrea Faulds
> On 24 Oct 2014, at 06:09, Xinchen Hui wrote: > so you prefer to expose the name of the property anywhere? > > let's say you expose a readonly int value name iSize.. > > but later, the value also need to be a double, > > then you also prefer add another dval? (since you can not simple > chan

Re: [PHP-DEV] [RFC] Readonly Properties

2014-10-24 Thread Rowan Collins
On 24 October 2014 00:36:35 GMT+01:00, Andrea Faulds wrote: >Good evening once again, > >Here’s another RFC: https://wiki.php.net/rfc/readonly_properties > >It proposes, with a working implementation, a modifier for properties >that makes them readable and writeable from different scopes. > >Since

Re: [PHP-DEV] [RFC] Readonly Properties

2014-10-24 Thread Andrey Andreev
Hi, On Fri, Oct 24, 2014 at 2:36 AM, Andrea Faulds wrote: > Good evening once again, > > Here’s another RFC: https://wiki.php.net/rfc/readonly_properties > > It proposes, with a working implementation, a modifier for properties that > makes them readable and writeable from different scopes. > >

Re: [PHP-DEV] [RFC] Readonly Properties

2014-10-24 Thread Patrick Schaaf
Am 24.10.2014 01:36 schrieb "Andrea Faulds" : > > Here’s another RFC: https://wiki.php.net/rfc/readonly_properties +1 for the general feature, I'd love to have that available. I have an idea regarding the additional keyword, with a small implication (improvement) to the functionality provided, bu

Re: [PHP-DEV] [RFC] Readonly Properties

2014-10-24 Thread Jordi Boggiano
On 24/10/2014 00:36, Andrea Faulds wrote: Here’s another RFC: https://wiki.php.net/rfc/readonly_properties It proposes, with a working implementation, a modifier for properties that makes them readable and writeable from different scopes. Since I am a big proponent of including specification pa

Re: [PHP-DEV] [RFC] Readonly Properties

2014-10-24 Thread Pierre Joye
hi Andrea, On Fri, Oct 24, 2014 at 6:36 AM, Andrea Faulds wrote: > Good evening once again, > > Here’s another RFC: https://wiki.php.net/rfc/readonly_properties > > It proposes, with a working implementation, a modifier for properties that > makes them readable and writeable from different scope

Re: [PHP-DEV] [RFC] Readonly Properties

2014-10-24 Thread Nikita Popov
On Fri, Oct 24, 2014 at 1:36 AM, Andrea Faulds wrote: > Good evening once again, > > Here’s another RFC: https://wiki.php.net/rfc/readonly_properties > > It proposes, with a working implementation, a modifier for properties that > makes them readable and writeable from different scopes. > > Since

Re: [PHP-DEV] [RFC] Readonly Properties

2014-10-24 Thread Alain Williams
On Fri, Oct 24, 2014 at 10:41:38AM +0200, Patrick Schaaf wrote: > Am 24.10.2014 01:36 schrieb "Andrea Faulds" : > > > > Here’s another RFC: https://wiki.php.net/rfc/readonly_properties > > +1 for the general feature, I'd love to have that available. > > I have an idea regarding the additional key

Re: [PHP-DEV] [RFC] Readonly Properties

2014-10-24 Thread Florian Margaine
Hi, On Fri, Oct 24, 2014 at 12:21 PM, Alain Williams wrote: > On Fri, Oct 24, 2014 at 10:41:38AM +0200, Patrick Schaaf wrote: > > Am 24.10.2014 01:36 schrieb "Andrea Faulds" : > > > > > > Here’s another RFC: https://wiki.php.net/rfc/readonly_properties > > > > +1 for the general feature, I'd lov

Re: [PHP-DEV] [RFC] Readonly Properties

2014-10-24 Thread Alain Williams
On Fri, Oct 24, 2014 at 12:29:57PM +0200, Florian Margaine wrote: > > Finally we could bring it all together and sidestep the scoping keywords > > using > > 'var' instead. Thus: > > > > var $callback as 0751; > > > > Would define a property that contains an anonymous function that could be > >

Re: [PHP-DEV] [RFC] Readonly Properties

2014-10-24 Thread Andrey Andreev
Hi, On Fri, Oct 24, 2014 at 12:34 PM, Pierre Joye wrote: > hi Andrea, > > On Fri, Oct 24, 2014 at 6:36 AM, Andrea Faulds wrote: >> Good evening once again, >> >> Here’s another RFC: https://wiki.php.net/rfc/readonly_properties >> >> It proposes, with a working implementation, a modifier for prop

Re: [PHP-DEV] [RFC] Readonly Properties

2014-10-24 Thread Andrea Faulds
> On 24 Oct 2014, at 10:29, Jordi Boggiano wrote: > > Thanks for the work (again). It's an interesting small idea but I'd much > prefer revisiting the original getter/setter RFC [1] which had a majority but > just fell short of the 66% mark. > > This RFC only implements parts of the getter/se

Re: [PHP-DEV] [RFC] Readonly Properties

2014-10-24 Thread Andrea Faulds
> On 24 Oct 2014, at 11:20, Nikita Popov wrote: > > While I think the functionality behind this proposal is nice in principle, I > have two objections with the RFC: > > 1. It uses the "readonly" modifier, to refer to a property that is publicly > readable, but protectedly writable (or protect

Re: [PHP-DEV] [RFC] Readonly Properties

2014-10-24 Thread Andrea Faulds
> On 24 Oct 2014, at 12:12, Andrey Andreev wrote: > > Pierre, I rarely disagree with you, but this is one such case. > > It is true that we can look at this as a partial solution to a bigger > problem, or as you said - a baby step. However, I see this as the > perfect solution for a very narrow

Re: [PHP-DEV] [RFC] Readonly Properties

2014-10-24 Thread Andrea Faulds
> On 24 Oct 2014, at 12:59, Andrea Faulds wrote: > >> >> 2. If the aim of this RFC is to replace the getFoo() pattern with the use of >> "readonly public $foo" properties, a primary difference will be that a >> getFoo() method can be declared in an interface, whereas a "readonly public >> $f

Re: [PHP-DEV] [RFC] UString

2014-10-24 Thread Chris Wright
On 24 October 2014 07:03, Joe Watkins wrote: > On Thu, 2014-10-23 at 12:54 -0700, Stas Malyshev wrote: > > Hi! > > > > > P.S. u() is a bad name, will break lots of code, i.e. > > > > Maybe __u()? It's a bit ugly but you're not allowed to use __ so it's > safe. > > > > /me cringes ... > > I wonder

Re: [PHP-DEV] [RFC] Safe Casting Functions

2014-10-24 Thread Marc Bennewitz
On 24.10.2014 01:53, Andrea Faulds wrote: >> On 23 Oct 2014, at 20:50, Marc Bennewitz wrote: >> >> You addresses data loss on convert float to int. >> Do you also address data loss on int to float? >> >> |to_float(||9223372036854774784) -> pass |as it results in >> 9223372036854774784 >> |to_floa

Re: [PHP-DEV] [RFC] Safe Casting Functions

2014-10-24 Thread Andrea Faulds
> On 24 Oct 2014, at 19:06, Marc Bennewitz wrote: > > > On 24.10.2014 01:53, Andrea Faulds wrote: >>> On 23 Oct 2014, at 20:50, Marc Bennewitz wrote: >>> >>> You addresses data loss on convert float to int. >>> Do you also address data loss on int to float? >>> >>> |to_float(||92233720368547

Re: [PHP-DEV] [RFC] Safe Casting Functions

2014-10-24 Thread Marc Bennewitz
On 24.10.2014 20:13, Andrea Faulds wrote: >> On 24 Oct 2014, at 19:06, Marc Bennewitz wrote: >> >> >> On 24.10.2014 01:53, Andrea Faulds wrote: On 23 Oct 2014, at 20:50, Marc Bennewitz wrote: You addresses data loss on convert float to int. Do you also address data loss on in

[PHP-DEV] Thoughts on the PHP.net website

2014-10-24 Thread Daniel Ribeiro
Good evening, Internals! *Disclaimer: *I wanted to bring this discussion inside the internals mailing list not only because of the fact that the PHP.net website's source code on GitHub doesn't have issues enabled, but especially because I think it's part of the PHP environment, just like the spec

Re: [PHP-DEV] [RFC] Safe Casting Functions

2014-10-24 Thread Andrea Faulds
> On 24 Oct 2014, at 19:52, Marc Bennewitz wrote: >> Floats are special, they are not expected to be precise. If we reject this, >> then perhaps we should also reject 0.1, because it can’t be precisely >> represented by a float? > It's a difference casting string to float or int to float. > Flo

Re: [PHP-DEV] Thoughts on the PHP.net website

2014-10-24 Thread Kris Craig
> > I'm not go further into the details of the problems we actually > have inside that code, as they are very obvious and the source code speaks > for itself I'm all for having a discussion about updating the website. But on the flip side of that token, you can't just "drive by" here, suggest a

Re: [PHP-DEV] Thoughts on the PHP.net website

2014-10-24 Thread Andrea Faulds
> On 24 Oct 2014, at 19:52, Daniel Ribeiro wrote: > > You all know the http://php.net website and it's source code > . It comes to my attention that this source > code is pretty much a very good example of how *not *to build websites in > PHP — the source code pre

Re: [PHP-DEV] Thoughts on the PHP.net website

2014-10-24 Thread Rowan Collins
Daniel Ribeiro wrote on 24/10/2014 19:52: *Disclaimer: *I wanted to bring this discussion inside the internals mailing list not only because of the fact that the PHP.net website's source code on GitHub doesn't have issues enabled, but especially because I think it's part of the PHP environment, j

Re: [PHP-DEV] Thoughts on the PHP.net website

2014-10-24 Thread Adam Harvey
On 25 October 2014 03:15, Rowan Collins wrote: > Daniel Ribeiro wrote on 24/10/2014 19:52: >> >> *Disclaimer: *I wanted to bring this discussion inside the internals >> mailing list not only because of the fact that the PHP.net website's >> source >> code on GitHub doesn't have issues enabled, but

Re: [PHP-DEV] Thoughts on the PHP.net website

2014-10-24 Thread Levi Morrison
>> What I wanted to know from you is: would it be interesting if we started a >> complete rewrite of the website, not only for actually improving it, but >> also for making it serve as a reference for people to see how the PHP >> environment has evolved and what are the good practices we use these

Re: [PHP-DEV] [RFC] Readonly Properties

2014-10-24 Thread Stas Malyshev
Hi! > Here’s another RFC: https://wiki.php.net/rfc/readonly_properties > > It proposes, with a working implementation, a modifier for properties that > makes them readable and writeable from different scopes. For me, this seems both too big and too small. Too small, because if you really it ass

Re: [PHP-DEV] [RFC] Readonly Properties

2014-10-24 Thread Kalle Sommer Nielsen
2014-10-24 7:09 GMT+02:00 Xinchen Hui : > so you prefer to expose the name of the property anywhere? > > let's say you expose a readonly int value name iSize.. > > but later, the value also need to be a double, > > then you also prefer add another dval? (since you can not simple > change ival name,

[PHP-DEV] PHPDBG nonsense (Was: Re: [PHP-CVS] com php-src: Made phpdbg compatible with new engine: ...)

2014-10-24 Thread Derick Rethans
On Fri, 24 Oct 2014, Bob Weinand wrote: > Commit:2bcac53bca8ea82d661f057b6d9ff3c7c84f05a7 > Author:Bob Weinand Fri, 24 Oct 2014 > 19:29:50 +0200 > Parents: 53560ca06b333b71883269091f7d74c0a25e087b > c03ac47bafd0ea55055a2f3d4de0bc6bb4d98d8d > Branches: master > > Link:

Re: [PHP-DEV] PHPDBG nonsense (Was: Re: [PHP-CVS] com php-src: Made phpdbg compatible with new engine: ...)

2014-10-24 Thread Joe Watkins
On Fri, 2014-10-24 at 23:06 -0400, Derick Rethans wrote: > On Fri, 24 Oct 2014, Bob Weinand wrote: > > > Commit:2bcac53bca8ea82d661f057b6d9ff3c7c84f05a7 > > Author:Bob Weinand Fri, 24 Oct 2014 > > 19:29:50 +0200 > > Parents: 53560ca06b333b71883269091f7d74c0a25e087b > > c03ac47