Hi!
- Variables may be used as input to out/ref arguments. Properties
may not.
This will probably be true for properties too, in some cases. However,
it is in no way an advantage.
- Properties may throw exceptions - variables will never do that.
In PHP, properties can not throw exceptions
Clint,
Very nice job overall! Looking quite good.
Alternatively we could throw an error to a call on isset and/or unset
against a property which didn't define an implementation.
I don't care for that concept much. All it's doing is trading one set
of boilerplate for another. I'd prefer
Hi!
would it be possible to add a second shorthand syntax to the complete
automatic implementation?
Examples:
class TimePeriod
{
public $Hours {};
public property $Hours;
public $Hours {property};
}
That could save quite some typing.
Overall, i really like it.
On Tue, Apr 24,
Clint,
Additionally, one more comment related to the read-only and
write-only. I noticed that you're using E_ERROR for improper access.
Obviously you don't want this to be a warning, as the execution
shouldn't continue because that would be undefined. However, what
about setting it to
Hi!
would it be possible to add a second shorthand syntax to the complete
automatic implementation?
Examples:
class TimePeriod
{
public $Hours {};
public property $Hours;
public $Hours {property};
}
How it is different from just public $Hours and why one would need this?
Hi!
public $dataArray {
get { return $this-_dataArray; }
This is not correct. Please read:
http://php.net/manual/en/language.references.return.php
These would also include automatic implementations which call the
respective functions on the backing field. I could see only allowing
Hi!
These would also include automatic implementations which call the
respective functions on the backing field. I could see only allowing
isset/unset automatic implementations if get/set were also specified
as automatic implementations.
Another thing about that. The automatic
.
-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 include automatic
code at a later time.
This suggestion below shortens the syntax even further.
-Original Message-
From: Stas Malyshev [mailto:smalys...@sugarcrm.com]
Sent: Tuesday, April 24, 2012 12:11 PM
To: Benjamin Eberlei
Cc: internals@lists.php.net
Subject: Re: [PHP-DEV] RFC: Property get/set syntax
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: Re: [PHP-DEV] RFC: Property get/set syntax (added isset
10 matches
Mail list logo