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

2013-01-06 Thread Clint Priest
Bringing up this old issue a bit. Nothing was ever said of unset? Should unset be benign? Since unset() is intended to take an action (rather than check on state) shouldn't an invalid unset (one with a guarded property that doesn't have a setter) emit a warning? On 10/30/2012 10:37 PM,

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

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

2012-10-29 Thread Ford, Mike
-Original Message- From: Clint Priest [mailto:cpri...@zerocue.com] Sent: 28 October 2012 16:03 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 */

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

2012-10-29 Thread Stas Malyshev
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)isset($o-b); /* This should return false and not emit any sort of warning/notice? */

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

2012-10-29 Thread Stas Malyshev
Hi! Is there another class of error that would make more sense? Don't most people turn off E_NOTICE errors? Perhaps emit an E_STRICT? I always run with E_NOTICE in development, that's kind of what E_NOTICE is for :) I don't think isset() should produce any warnings/notices - this is how it

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

2012-10-28 Thread Pierre Joye
hi Clint, On Sat, Oct 27, 2012 at 7:39 PM, Clint Priest cpri...@zerocue.com wrote: 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

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

2012-10-28 Thread Clint Priest
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 emit any sort of warning/notice? */ I mean specifically,

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

2012-10-28 Thread David Muir
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 emit any sort of

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

2012-10-28 Thread Clint Priest
That's pretty fair, that last statement... As far as an application is concerned $o-b doesn't exist because it can't be read. Seems as though some developers are going to want to know when they've tried to violate it though... I dunno. Personally I would consider it error or warning worthy

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

[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

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

2012-10-26 Thread Stas Malyshev
Hi! 1. If all cases can be tested for during compilation, prefer compile failures. Not likely. isset($foo-$bar) is completely opaque since we don't know what $foo or $bar is. 2. Let the compilation occur and at runtime when a disallowed action is attempted, emit a