RE: [PHP-DEV] RFC: Property get/set syntax (added isset/unset and references)

2012-04-24 Thread Clint Priest
that interface. -Original Message- From: Stas Malyshev [mailto:smalys...@sugarcrm.com] Sent: Tuesday, April 24, 2012 12:34 PM To: Clint Priest Cc: internals@lists.php.net Subject: Re: [PHP-DEV] RFC: Property get/set syntax (added isset/unset and references) Hi! > These would also

RE: [PHP-DEV] RFC: Property get/set syntax (added isset/unset and references)

2012-04-24 Thread Clint Priest
Here is a copy of what Dennis had written to me regarding automatic implementations from C# (the model): > Originally, C# did not support automatically implemented properties. > There are several reasons why they were added. The first reason, is that > while the syntax for properties is the sa

RE: [PHP-DEV] RFC: Property get/set syntax (added isset/unset and references)

2012-04-24 Thread Clint Priest
in an unstable state however" as Derick mentions on his post about E_RECOVERABLE_ERROR. > -Original Message- > From: Anthony Ferrara [mailto:ircmax...@gmail.com] > Sent: Tuesday, April 24, 2012 10:40 AM > To: Clint Priest > Cc: internals@lists.php.net > Subject:

[PHP-DEV] Trouble with zend_language_parser.y

2012-04-25 Thread Clint Priest
I'm having some trouble setting up the re2c to allow the isset/unset. Here are the definitions, I've added the two T_ISSET statements: accessors: accessor_function accesso

[PHP-DEV] RE: Trouble with zend_language_parser.y

2012-05-02 Thread Clint Priest
Anyone have any help with this? $1 of the first T_ISSET is matching against "\n\t\tisset {..." (... being the rest of the set body through to the end of the script. -Original Message----- From: Clint Priest [mailto:cpri...@zerocue.com] Sent: Wednesday, April 25, 2012 1

RE: [PHP-DEV] Trouble with zend_language_parser.y

2012-05-07 Thread Clint Priest
ay, May 05, 2012 10:19 AM To: Clint Priest Cc: internals@lists.php.net Subject: Re: [PHP-DEV] Trouble with zend_language_parser.y Hi, 2012/4/26 Clint Priest : > I'm having some trouble setting up the re2c to allow the isset/unset.  Here > are the definitions, I've added

RE: [PHP-DEV] RE: Trouble with zend_language_parser.y

2012-05-07 Thread Clint Priest
turday, May 05, 2012 10:07 AM > To: Clint Priest > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] RE: Trouble with zend_language_parser.y > > Hi Clint, > > On Wed, May 2, 2012 at 3:23 PM, Clint Priest wrote: > > Anyone have any help with this? > > hard

RE: [PHP-DEV] RE: Trouble with zend_language_parser.y

2012-05-07 Thread Clint Priest
That makes complete sense, it is indeed a LONG type that's getting to that point, thank you! > -Original Message- > From: Nikita Popov [mailto:nikita@googlemail.com] > Sent: Monday, May 07, 2012 2:27 PM > To: Clint Priest > Cc: Etienne Kneuss; Felipe Pena

[PHP-DEV] Array decomposition, more than list()

2012-05-13 Thread Clint Priest
I've been using array decomposition in other languages such as Javascript recently and find it very useful. I did not find any conversation about it in the archives, has this topic been discussed/vetted/shot down already? Example use case: Indexed database results being iterated: Input: $tValu

RE: [PHP-DEV] Array decomposition, more than list()

2012-05-13 Thread Clint Priest
would be really incredible for PHP as well. I see on that document it does not talk about a complex destructuring such as I've described above. My email here was to find if this would garner any interest from the PHP community. > -Original Message- > From: Ivan Enderl

RE: [PHP-DEV] [RFC] Custom Casting

2012-05-13 Thread Clint Priest
This has already been covered quite a bit, the problem with your suggestion is that the compiler needs to determine the type it is cast to, which is why the __toInt(), __toArray(), etc, so that the language can request the type it needs to cast to. > -Original Message- > From: Seva Laps

RE: [PHP-DEV] Re: [VOTE] Vote change for empty() RFC

2012-05-13 Thread Clint Priest
Ironically enough, he's probably the only "whole man" of the Lannisters really. > -Original Message- > From: Stas Malyshev [mailto:smalys...@sugarcrm.com] > Sent: Sunday, May 13, 2012 6:23 PM > To: Ferenc Kovacs > Cc: PHP internals > Subject: Re: [PHP-DEV] Re: [VOTE] Vote change for empty(

RE: [PHP-DEV] [RFC] Custom Casting

2012-05-14 Thread Clint Priest
Both of the RFC's you reference are for casting TO a scalar, not TO an object type. Your pastbin is for casting FROM a scalar TO an object. -Original Message- From: Seva Lapsha [mailto:seva.lap...@gmail.com] Sent: Monday, May 14, 2012 6:18 AM To: Clint Priest Cc: inte

RE: [PHP-DEV] [RFC] Custom Casting

2012-05-14 Thread Clint Priest
How would one use your Castable interface to cast a Class "Test" to any of integer, array or boolean? From: Seva Lapsha [mailto:seva.lap...@gmail.com] Sent: Monday, May 14, 2012 12:19 PM To: Clint Priest Cc: internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] Custom Casting My past

[PHP-DEV] zend_compile_string() usage within code

2012-05-28 Thread Clint Priest
Has anyone ever used the zend_compile_string() within the c code for compiling internally created php? Is it frowned upon or has it never come up before? In writing the accessors code I have several parts that are effectively just mimicking what a simple zend_compile_string() would accomplish i

RE: [PHP-DEV] RFC: Property get/set syntax

2012-07-08 Thread Clint Priest
playing around with. Hopefully I'll have that fixed up later this week. From: Benjamin Eberlei [mailto:kont...@beberlei.de] Sent: Thursday, June 28, 2012 4:55 AM To: Clint Priest Cc: Stas Malyshev; internals@lists.php.net Subject: Re: [PHP-DEV] RFC: Property get/set syntax What is the state

RE: [PHP-DEV] 6.0 And Moving Forward

2012-07-14 Thread Clint Priest
+1 :) > -Original Message- > From: Kris Craig [mailto:kris.cr...@gmail.com] > Sent: Friday, July 13, 2012 11:47 AM > To: Anthony Ferrara > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] 6.0 And Moving Forward > > > > > > > 4. Rewrite the entire parser completely. I keep hearing abou

[PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-08 Thread Clint Priest
It's been a while since I posted any updates about this, a few individuals have been asking about it privately and wanting me to get it out the door for PHP 5.5 release. It's come a long way since the last time I posted about it. RFC Document: https://wiki.php.net/rfc/propertygetsetsyntax-as-im

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-08 Thread Clint Priest
27;s <.01s difference. Depending on the run it is sometimes exactly the same performance. > -Original Message----- > From: Clint Priest [mailto:cpri...@zerocue.com] > Sent: Monday, October 08, 2012 6:53 AM > To: internals@lists.php.net > Subject: [PHP-DEV] [RFC] Propety Accessors

RE: [PHP-DEV] [RFC] Property Accessors v1.1

2012-10-08 Thread Clint Priest
2 7:50 AM > To: Clint Priest > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] [RFC] Propety Accessors v1.1 > > Good work Clint! > > Performance is probably one of the things people will complain about so it's > good that your benchmark is proving that it'

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-08 Thread Clint Priest
nstant, which is quite nice. The > typehinting is a big plus as well. > > On Mon, Oct 8, 2012 at 3:26 PM, Benjamin Eberlei wrote: > > > The set() one is really nice with the typehints. > > > > On Tue, Oct 9, 2012 at 12:19 AM, Aaron Holmes > > wro

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-08 Thread Clint Priest
, October 08, 2012 10:08 PM To: Clint Priest Cc: internals@lists.php.net; Aaron Holmes; Benjamin Eberlei Subject: Re: [PHP-DEV] [RFC] Propety Accessors v1.1 While I understand your concern with set being the only keyword using (), and even agree it's a bit problematic, I see a big problem with

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-09 Thread Clint Priest
Wow, I'm surprised by all the talk about this RFC this time around. I posted this numerous times in the past trying to elicit feedback and got little to none, so I took the time to write it as I thought it should be written. Some of these things will take considerable effort to fix/correct/cha

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-10 Thread Clint Priest
> On 10 October 2012 01:16, Johannes Schlüter wrote: > > Up until now reflection is leaky and is telling the truth. We should > > either keep that or completely clean up reflection. > > Reflection should always tell the truth, or there is no point in it. > Unfortunately the "truth" here is subj

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-10 Thread Clint Priest
> > Second, I'd like to throw in the idea of array accessors. I mentioned > > this before, but did not get any response. > > > > public $Addresses { > > offsetSet($offset, $value) { ... } > > offsetGet() { ... } > > offsetUnset($offset) { ... } > > offsetExists($offset) { ... } > >

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-10 Thread Clint Priest
> >> What concerns me with the current implementation is that it leaks > >> many implementation details, in particular the fact that the > >> accessors are implemented as *real* __getXYZ methods and automatic > >> implementations also use *real* $__XYZ properties. > > > I don't particularly see th

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-10 Thread Clint Priest
> On Wed, Oct 10, 2012 at 5:51 AM, Clint Priest wrote: > > I'm not even sure that automatic backing fields are even desired, I > > never felt the need to have them in C# and the only reason they were > > included is because they were a part of Dennis's original

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-10 Thread Clint Priest
> field(s) protected - this would be the equivalent of > declaring a read-only accessor that you are permitted to extend with a > write-accessor if you need to... > > > -- Forwarded message -- > From: Jazzer Dane > To: Leigh > Cc: Clint Priest , "int

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-10 Thread Clint Priest
Okay, I would like this to be the last time there are revisions to this RFC. To sum up the last few days of conversations, I have these down as points of contention: 1. Accessor functions should not be present on the object and callable directly, for example, $o->__getHours() should not be a

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-10 Thread Clint Priest
the few modern languages that does not have such a feature. > -Original Message- > From: Levi Morrison [mailto:morrison.l...@gmail.com] > Sent: Wednesday, October 10, 2012 8:27 PM > To: Clint Priest > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] [RFC] Propety Acces

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-10 Thread Clint Priest
Wednesday, October 10, 2012 9:18 PM To: Clint Priest Cc: internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] Propety Accessors v1.1 This all sounds about right. In regards to #4 - read-only/write-only: I think that, from a "pretty syntax" point of view, private final set() {} and privat

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-10 Thread Clint Priest
What about private final set($value) { } tells you that it's read only? There is a setter. From: Pierre Joye [mailto:pierre@gmail.com] Sent: Thursday, October 11, 2012 12:05 AM To: Clint Priest Cc: PHP internals; Jazzer Dane Subject: RE: [PHP-DEV] [RFC] Propety Accessors v1.1 On O

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-11 Thread Clint Priest
This would produce a compile error, cannot define set, property is read-only. > -Original Message- > From: Pierre Joye [mailto:pierre@gmail.com] > Sent: Thursday, October 11, 2012 7:43 AM > To: Sebastian Krebs > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] [RFC] Propety Accesso

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-11 Thread Clint Priest
greement... Or... do ya'll want to vote on the aforementioned changes? > -Original Message- > From: Clint Priest [mailto:cpri...@zerocue.com] > Sent: Wednesday, October 10, 2012 7:36 PM > To: internals@lists.php.net > Subject: RE: [PHP-DEV] [RFC] Propety Accessors v1.1 &g

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-11 Thread Clint Priest
er 11, 2012 6:42 PM To: Clint Priest Cc: internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] Propety Accessors v1.1 You really don't want to even think about my idea? It's complementary on some aspects, you know. 2012/10/11 Clint Priest mailto:cpri...@zerocue.com>> Rather than

[PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-11 Thread Clint Priest
Alright, here is the updated RFC as per discussions for the last few days: https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented If you could read it over, make sure I have all of your concerns correctly addressed and we can leave this open for the two week waiting period while I make th

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-12 Thread Clint Priest
I must have missed taking that part out of the RFC, they would not be needed any more with those keywords being removed. > -Original Message- > From: Levi Morrison [mailto:morrison.l...@gmail.com] > Sent: Friday, October 12, 2012 9:45 AM > To: Clint Priest > Cc: internal

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-12 Thread Clint Priest
on point before proceeding? > -Original Message- > From: Nikita Popov [mailto:nikita@gmail.com] > Sent: Friday, October 12, 2012 5:48 AM > To: Clint Priest > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 > > On Fri, Oct 12,

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-12 Thread Clint Priest
AM To: Clint Priest Cc: internals@lists.php.net Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 I like it. I assume that, in regards to static properties, the static keyword works just as well as self and parent, correct? On Thu, Oct 11, 2012 at 10:23 PM, Clint Priest mailto:cpri

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-12 Thread Clint Priest
/Property_%28programming%29 Lastly, it would probably delay this project another 6 months, perhaps it could be shelved for a version 2 of the accessors aspect? -Clint > -Original Message- > From: Bernhard Schussek [mailto:bschus...@gmail.com] > Sent: Friday, October 12, 2012 3:07 AM

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-13 Thread Clint Priest
Interfaces are used to define what methods must be present, properties are not allowed. From: amaury.bouch...@gmail.com [mailto:amaury.bouch...@gmail.com] On Behalf Of Amaury Bouchard Sent: Saturday, October 13, 2012 5:06 AM To: Nikita Popov Cc: Benjamin Eberlei; Clint Priest; internals

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-13 Thread Clint Priest
> > On Sat, Oct 13, 2012 at 6:47 AM, Clint Priest wrote: > > The problem with that Nikita is that it would need a variable storage > > location, which would mean a hidden, auto-implemented property. You were > > dead-set against that from the get go. > What I

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-13 Thread Clint Priest
mail.com>] On Behalf Of Amaury Bouchard Sent: Saturday, October 13, 2012 5:06 AM To: Nikita Popov Cc: Benjamin Eberlei; Clint Priest; internals@lists.php.net<mailto:internals@lists.php.net> Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 2012/10/13 Nikita Popov mailto:nikita.

Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-13 Thread Clint Priest
-Clint On Oct 13, 2012, at 4:21 PM, "Amaury Bouchard" mailto:ama...@amaury.net>> wrote: 2012/10/13 Clint Priest mailto:cpri...@zerocue.com>> Interfaces are used to define what methods must be present, properties are not allowed. Yes, so no one should be correct, right?

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-14 Thread Clint Priest
r, you can rely on the fact that anyone who implements that interface *must* implement an accessor of the given name. From: amaury.bouch...@gmail.com [mailto:amaury.bouch...@gmail.com] On Behalf Of Amaury Bouchard Sent: Sunday, October 14, 2012 3:23 AM To: Clint Priest Cc: Nikita Popov; Benjam

[PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Typehints / Accessor Syntax

2012-10-15 Thread Clint Priest
* I'm moving this into its own mail thread because talking about 5 different topics under the same chain is ridiculous (has anyone suggested forums instead of email??) > So here comes my round of feedback on the current proposal. > > But before getting to that: I have collected a bit of data

[PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Interfaces

2012-10-15 Thread Clint Priest
* I'm moving this into its own mail thread because talking about 5 different topics under the same chain is ridiculous (has anyone suggested forums instead of email??) > So here comes my round of feedback on the current proposal. > > But before getting to that: I have collected a bit of data

[PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Backing Property

2012-10-15 Thread Clint Priest
* I'm moving this into its own mail thread because talking about 3* different topics under the same chain is ridiculous (has anyone suggested forums instead of email??) > So here comes my round of feedback on the current proposal. > > But before getting to that: I have collected a bit of dat

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Interfaces

2012-10-15 Thread Clint Priest
Message- > From: ekne...@gmail.com [mailto:ekne...@gmail.com] On Behalf Of Etienne Kneuss > Sent: Monday, October 15, 2012 8:29 AM > To: Clint Priest > Cc: Nikita Popov (nikita@gmail.com); internals@lists.php.net > Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Int

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-15 Thread Clint Priest
> 1) Point taken. > > 2) The use case can be solved with an object implementing ArrayAccess, but > not pragmatically, because then you need a class for > *each* bidirectional association. Let me give a short example: > > Given the class Article with a bidirectional many-to-one relation to Catego

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Backing Property

2012-10-15 Thread Clint Priest
__get v1.4 @ 10/8/20121m .04sn/a .21s "Direct" vs "Getter" vs "__get" on 1 million cycles. > -Original Message- > From: Levi Morrison [mailto:morrison.l...@gmail.com] > Sent: Monday, Octo

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Interfaces

2012-10-15 Thread Clint Priest
> -Original Message- > From: ekne...@gmail.com [mailto:ekne...@gmail.com] On Behalf Of Etienne Kneuss > Sent: Monday, October 15, 2012 9:10 AM > To: Clint Priest > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Interface

Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Interfaces

2012-10-15 Thread Clint Priest
Because fundamentally interfaces are designed to explain a way of communicating and properties are symmetrical and non-observable. The implementing class cannot "know" when a property has changed. -Clint On Oct 15, 2012, at 9:37 AM, "Levi Morrison" wrote: >> I *think* we are on the same page

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Interfaces

2012-10-15 Thread Clint Priest
> On Mon, Oct 15, 2012 at 6:02 PM, Clint Priest wrote: > > Because fundamentally interfaces are designed to explain a way of > > communicating and properties are symmetrical and non- > observable. > > > > The implementing class cannot "know" when a prop

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Interfaces

2012-10-16 Thread Clint Priest
sugarcrm.com] > Sent: Tuesday, October 16, 2012 4:37 AM > To: Clint Priest > Cc: Nikita Popov (nikita@gmail.com); internals@lists.php.net > Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Interfaces > > Hi! > > > I think that accessors should be allowed w

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Typehints / Accessor Syntax

2012-10-16 Thread Clint Priest
as Malyshev [mailto:smalys...@sugarcrm.com] > Sent: Tuesday, October 16, 2012 4:58 AM > To: Amaury Bouchard > Cc: Levi Morrison; Clint Priest; internals@lists.php.net; Nikita Popov > (nikita@gmail.com) > Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Typehints /

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-16 Thread Clint Priest
AM > To: Paul Dragoonis > Cc: Clint Priest; internals@lists.php.net > Subject: Re: [PHP-DEV] [RFC] Propety Accessors v1.1 > > Hi! > > > What remains on your TODO list for this functionality? > > When are you planning to run an RFC vote on this? > > > >

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-16 Thread Clint Priest
Hey Stas, a bunch of this has already been covered but I will attempt to answer each of these as is my current understanding of "the hives" decision... :P > 1. Accessors IMO should be regular PHP methods that PHP generates with two > additional things: > a. Their name is generated by PHP > b. Th

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Interfaces

2012-10-16 Thread Clint Priest
> -Original Message- > From: Stas Malyshev [mailto:smalys...@sugarcrm.com] > Sent: Tuesday, October 16, 2012 6:06 AM > To: Clint Priest > Cc: Nikita Popov (nikita@gmail.com); internals@lists.php.net > Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 :

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-16 Thread Clint Priest
P like that. From: Jazzer Dane [mailto:tbprogram...@gmail.com] Sent: Tuesday, October 16, 2012 6:45 AM To: Clint Priest Cc: Stas Malyshev; internals@lists.php.net Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 private final get/set() {} is indeed not a read/write only functional

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-16 Thread Clint Priest
Gabeezus, I have to get to work Stas! ;) > > This is the way it is, though Nikita strongly disagrees that they > > should be "callable, visible" methods on the object and I agree with > > Nikita on this issue, I never did like the idea that __getHours() and > > I think PHP engine has enough compl

Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Interfaces

2012-10-16 Thread Clint Priest
My choice of words were misleading/incorrect. If you are programming to an interface then the interface dictates what *will* work, if you attempt to use an interface to do something that the interface has not declared is supported then it may work or it may fail. On Oct 16, 2012, at 7:43 AM, "

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-16 Thread Clint Priest
lys...@sugarcrm.com] > Sent: Tuesday, October 16, 2012 5:48 AM > To: Jazzer Dane > Cc: Clint Priest; internals@lists.php.net > Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 > > Hi! > > > Stas, the proposed "solution" thus far is to make t

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-16 Thread Clint Priest
pulled from the original RFC that Dennis wrote some 4 years ago. Perhaps we don't even NEED a solution to this problem. > -Original Message- > From: Stas Malyshev [mailto:smalys...@sugarcrm.com] > Sent: Tuesday, October 16, 2012 5:59 AM > To: Jazzer Dane > Cc: Clint Priest

[PHP-DEV] Alternatives to mailing list?

2012-10-16 Thread Clint Priest
Is it just me or has this Property Accessors chain of emails been impossible to make heads or tails of? People replying within replies within replies, quoting partial emails, cross-posting and all sorts of chaos. Would anyone be willing to entertain an alternative "communication method" with s

RE: [PHP-DEV] Alternatives to mailing list?

2012-10-16 Thread Clint Priest
I was thinking more along the lines of a collaborative wiki with inline-threaded comments... > -Original Message- > From: Jan Ehrhardt [mailto:php...@ehrhardt.nl] > Sent: Tuesday, October 16, 2012 8:00 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] Alternatives to mailing list?

RE: [PHP-DEV] Alternatives to mailing list?

2012-10-17 Thread Clint Priest
> Sent: Wednesday, October 17, 2012 4:43 AM > To: Lester Caine > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] Alternatives to mailing list? > > hi, > > On Wed, Oct 17, 2012 at 11:21 AM, Lester Caine wrote: > > Clint Priest wrote: > >> > >>

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-17 Thread Clint Priest
> > This isn't the way isset() works, isset() will return true for a > > variable with a value of 0 > > Exactly my point. Your code (with != NULL) will return false while real > isset() will return true. Stas, please see this execution output, your arguments about isset()/unset() are just plain

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-17 Thread Clint Priest
I've been re-reading the last few days of posts to collect what is to be changed about the RFC on what has seemed to come to a consensus and my apologies Stas, I did not catch exactly what you meant by this statement: > > Exactly my point. Your code (with != NULL) will return false while real >

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Interfaces

2012-10-17 Thread Clint Priest
? > -Original Message- > From: David Muir [mailto:davidkm...@gmail.com] > Sent: Tuesday, October 16, 2012 11:20 PM > To: Clint Priest > Cc: Stas Malyshev; Nikita Popov (nikita@gmail.com); > internals@lists.php.net > Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Access

Re: [PHP-DEV] Alternatives to mailing list?

2012-10-17 Thread Clint Priest
I was really referring to another tool to collaborate on an RFC document, something where comment threads can be started and replied to from within the context/section of the RFC that the comment belongs to. Ive looked at a few other wikis and some have this capability... Github could be close

RE: [PHP-DEV] Wiki account

2012-10-18 Thread Clint Priest
Who's the karma keeper anyways? Do we get a score? ;) > -Original Message- > From: Pierre Joye [mailto:pierre@gmail.com] > Sent: Thursday, October 18, 2012 5:03 AM > To: Marcello Duarte > Cc: PHP internals; Hannes Magnusson; Derick Rethans > Subject: Re: [PHP-DEV] Wiki account > > Wh

Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] Parallel run-tests

2012-10-19 Thread Clint Priest
Could just as easily launch N sub-processes from run-tests.php as well. I compile php in a VM with -j 40 on a dual core VM powered by quad core chip... The number of simultaneous tests doesn't need to line up with CPU counts... -Clint On Oct 18, 2012, at 7:28 AM, "Pierre Joye" wrote: > hi! >

Re: [PHP-DEV] Wiki account

2012-10-19 Thread Clint Priest
Got an email? -Clint On Oct 18, 2012, at 7:29 AM, "Kris Craig" mailto:kris.cr...@gmail.com>> wrote: On Thu, Oct 18, 2012 at 4:58 AM, Clint Priest mailto:cpri...@zerocue.com>> wrote: Who's the karma keeper anyways? Do we get a score? ;) I'm not 100% sure, b

[PHP-DEV] [RFC] Accessors v1.1 -> v1.2 Summary

2012-10-19 Thread Clint Priest
Hey everyone, seems like the conversations have died down and I've attempted to go back through all of the emails and produce a 1.1 -> 1.2 document which summarizes what I believe are decided, being debated, issues, todos, etc. Pierre had pointed out that I had partially changed the "as-implemen

[PHP-DEV] [RFC] Accessors : read-only / write-only keywords

2012-10-19 Thread Clint Priest
I had thought of a deviation on some of the ideas presented to get rid of read-only/write-only while still keeping the ability to maintain their effect, if we so decide that the feature is wanted. Here it is: class TimePeriod { private $Seconds; public $Hours { get() { return $

RE: [PHP-DEV] [RFC] Accessors v1.1 -> v1.2 Summary

2012-10-20 Thread Clint Priest
gt; From: Pierre Joye [mailto:pierre@gmail.com] > Sent: Saturday, October 20, 2012 5:16 AM > To: Clint Priest > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] [RFC] Accessors v1.1 -> v1.2 Summary > > On Sat, Oct 20, 2012 at 1:06 AM, Clint Priest wrote: > > Hey every

Re: [PHP-DEV] [RFC] Accessors : read-only / write-only keywords

2012-10-20 Thread Clint Priest
way. For most properties that only have a > read-accessor, it won't even make any sense for someone > to try to extend that with a write-accessor. And as said, if you want to keep > the internal value safe from write, just declare the actual > property as private. > > -

RE: [PHP-DEV] [RFC] Accessors : read-only / write-only keywords

2012-10-21 Thread Clint Priest
I think that seems to be the consensus at this point, anyone disagree? > -Original Message- > From: Levi Morrison [mailto:morrison.l...@gmail.com] > Sent: Sunday, October 21, 2012 10:26 AM > To: Amaury Bouchard > Cc: Nikita Popov; Clint Priest; internals@lists.php.net >

[PHP-DEV] [RFC] Property Accessors 1.2 : Shadowing

2012-10-26 Thread Clint Priest
I'm opening up several new threads to get discussion going on the remaining "being debated" categories referenced in this 1.1 -> 1.2 change spec: https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented/change-requests Shadowing v1.1 has properties shadow accessors, the suggestion is that

[PHP-DEV] [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability

2012-10-26 Thread Clint Priest
I'm opening up several new threads to get discussion going on the remaining "being debated" categories referenced in this 1.1 -> 1.2 change spec: https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented/change-requests

[PHP-DEV] [RFC] Property Accessors v1.2 : isset / unset "failable"

2012-10-26 Thread Clint Priest
I'm opening up several new threads to get discussion going on the remaining "being debated" categories referenced in this 1.1 -> 1.2 change spec: https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented/change-requests

[PHP-DEV] [RFC] Property Accessors v1.2 : Interfaces

2012-10-26 Thread Clint Priest
I'm opening up several new threads to get discussion going on the remaining "being debated" categories referenced in this 1.1 -> 1.2 change spec: https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented/change-requests

[PHP-DEV] [RFC] Property Accessors v1.2 : Extra shorthand declaration

2012-10-26 Thread Clint Priest
I'm opening up several new threads to get discussion going on the remaining "being debated" categories referenced in this 1.1 -> 1.2 change spec: https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented/change-requests

Re: [PHP-DEV] [RFC] Property Accessors 1.2 : Shadowing

2012-10-27 Thread Clint Priest
Recursion is guarded by the same mechanism __get uses to avoid recursion. On 10/26/2012 9:33 AM, Stas Malyshev wrote: Hi! v1.2 Proposes that this be inverted such that if there is an accessor defined for a given property name, the accessor will always be used. The accessor would be able to get

Re: [PHP-DEV] [RFC] Property Accessors v1.2 : isset / unset "failable"

2012-10-27 Thread Clint Priest
That's basically what #2 is getting at, my only question is, emit a warning or notice or not? Technically returning false on an invalid isset() call could be misleading without emitting some kind of notice or warning about it. On 10/26/2012 9:56 AM, Stas Malyshev wrote: Hi! 1. If al

Re: [PHP-DEV] [RFC] Property Accessors v1.2 : Extra shorthand declaration

2012-10-27 Thread Clint Priest
On 10/26/2012 9:39 AM, Stas Malyshev wrote: Hi! /* Would be equivalent to this */ class TimePeriod { public $date { get() { return $this->date; } set(DateTime $value) { $this->date = $value;} } } I don't think this has a use case and this encourages mixing var

Re: [PHP-DEV] [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability

2012-10-27 Thread Clint Priest
That's why I think they shouldn't even be visible to users, they aren't relevant to them and in fact it could mis-lead them into thinking that they could simply define __getHours() and expect $foo->Hours to call it, which it wouldn't. To me, the bottom line is, the fact that there are methods

Re: [PHP-DEV] [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability

2012-10-27 Thread Clint Priest
On 10/26/2012 6:37 PM, Stas Malyshev wrote: Hi! Stas, if you define an accessor, how do you define it? Do you say Either way, doesn't matter. According to the current proposal at least you can write the first code *and the first code only*. If you write the second code then you That's wher

Re: [PHP-DEV] [RFC] Property Accessors 1.2 : Shadowing

2012-10-27 Thread Clint Priest
Sorry I guess I should have been more clear. The recursion would prevent the accessor from being called which would allow the ordinary property code to execute, thus accessing the property directly. I suppose if it were in a setter and the property were not defined by the accessor then it wou

Re: [PHP-DEV] [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability

2012-10-27 Thread Clint Priest
erly named accessor function. Failing that it would then check for the existence of a property and failing that move on to looking up __get -Clint On 10/27/2012 2:14 PM, Patrick Schaaf wrote: On Saturday 27 October 2012 13:05:27 Clint Priest wrote: That's why I think they shouldn'

Re: [PHP-DEV] [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability

2012-10-27 Thread Clint Priest
Stas, you should probably do some research before posting such non-sense: http://en.wikipedia.org/wiki/Property_%28programming%29 Every language you mentioned has them. Perhaps the confusion is that I am calling them accessors since other languages refer to accessors as "properties" while PHP

Re: [PHP-DEV] [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability

2012-10-27 Thread Clint Priest
:48:12 PM, Larry Garfield wrote: On 10/27/2012 09:38 PM, Larry Garfield wrote: On 10/26/2012 05:37 AM, Clint Priest wrote: I'm opening up several new threads to get discussion going on the remaining "being debated" categories referenced in this 1.1 -> 1.2 change spec: https:/

Re: [PHP-DEV] [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability

2012-10-28 Thread Clint Priest
On 10/28/2012 2:04 AM, Stas Malyshev wrote: Hi! Stas, you should probably do some research before posting such non-sense: Which part is "non-sense"? I've brought you examples of Python and Ruby not doing exactly what you claim all languages are doing. By your definition, they don't have access

Re: [PHP-DEV] [RFC] Property Accessors v1.2 : isset / unset "failable"

2012-10-28 Thread Clint Priest
ll (since the value cannot be retrieved). On Sunday, October 28, 2012 4:02:23 AM, Pierre Joye wrote: hi Clint, On Sat, Oct 27, 2012 at 7:39 PM, Clint Priest wrote: That's basically what #2 is getting at, my only question is, emit a warning or notice or not? Technically returning false on

Re: [PHP-DEV] [RFC] Property Accessors 1.2 : Shadowing

2012-10-28 Thread Clint Priest
Well I guess this and many of the other issues from other threads are the reasons I had it written the way that it is currently (basically an extension of __get()) but numerous other proposals have muddied the situation. On Sunday, October 28, 2012 2:17:47 AM, Stas Malyshev wrote: Hi! Sorry

Re: [PHP-DEV] [RFC] Property Accessors v1.2 : isset / unset "failable"

2012-10-28 Thread Clint Priest
ir wrote: On 29/10/12 03:02, Clint Priest wrote: So... to be explicit here, you think in this situation: class a { public $b { set($x) { $this->b = $x; } } } $o = new a(); if(!isset($o->b)) { /* delete files */ } echo (int)isset($o->b); /* This should return false and not emi

Re: [PHP-DEV] [RFC] Property Accessors v1.2 : isset / unset "failable"

2012-10-30 Thread Clint Priest
Would you say the same of unset? Always benign? On 10/29/2012 2:14 PM, Stas Malyshev wrote: Hi! So... to be explicit here, you think in this situation: class a { public $b { set($x) { $this->b = $x; } } } $o = new a(); if(!isset($o->b)) { /* delete files */ } echo (int)

Re: [PHP-DEV] [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability

2012-11-14 Thread Clint Priest
ee? On 10/26/2012 5:37 AM, Clint Priest wrote: I'm opening up several new threads to get discussion going on the remaining "being debated" categories referenced in this 1.1 -> 1.2 change spec: https://wiki.php.net/rfc/propertygetsetsyntax-as

Re: [PHP-DEV] [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability

2012-11-14 Thread Clint Priest
*sigh* Which error would make more sense to you Stas... Given this code: class a { public $b { get() { return 5; } private set($x) { /* do something */ } } } $o = new a(); echo $o->b; $o->b = 42; There are two possibilities at this point. The code base, without all

  1   2   >