Hi,

what about having "strict classes"?
A strict class would be like a database table, each property defined must have 
a type.
Each property defined must be initialized before being accessed, or have a 
default value.

e.g.
strict class Foo {
    public int $id;
    public bool $enabled;
    public DateTime $created;
}

Regards
Thomas

Dmitry Stogov wrote on 10.06.2016 14:37:

> Hi,
> 
> 
> I hardly worked on implementation of this patch for a week, but I still don't
> like it.
> 
> It makes 15% slowdown on each property update in existing PHP code (without
> types), and I don't see a way to improve this.
> 
> Update of typed properties is going to be even more expensive.
> 
> Benchmark results are included into RFC (and not changed with the latest
> version of the patch).
> 
> 
> -1.
> 
> 
> Thanks. Dmitry.
> 
> ________________________________
> From: Joe Watkins <pthre...@pthreads.org>
> Sent: Friday, June 10, 2016 1:38:04 PM
> To: PHP internals; Phil Sturgeon
> Subject: [PHP-DEV] [RFC][Vote] Typed Properties
> 
> Afternoon internals,
> 
>    The vote for typed properties has been restarted.
> 
>    Please take part: https://wiki.php.net/rfc/typed-properties
> 
> Cheers
> Joe
> 


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to