Re: [PHP-DEV] Initializer List

2015-06-17 Thread Sebastian B.-Hagensen
Hi, the proposed syntax also clashes with the new return type hints. They don't make sense on construct, but reusing the same syntax for two different things should be avoided if possible. Hack implements a related approach (without most of the c++ guarantees and benefits as it is pure syntactic

Re: [PHP-DEV] Initializer List

2015-06-17 Thread Johannes Schlüter
On Wed, 2015-06-17 at 10:03 +0200, Lorenzo Fontana wrote: > - In C++ using initializer list is used over assignment also for > performance reasons but right now I can't say if this can be achieved in > PHP or not. > > Initializer lists in C++: > http://en.cppreference.com/w/cpp/language/initialize

[PHP-DEV] Initializer List

2015-06-17 Thread Lorenzo Fontana
Hi All! As stated in the Wiki RFC HowTo section I'm here to measure the reaction about my proposal. I would like to propose an RFC and then implement initializer list for constructors in PHP. Being a C++ developer I find this feature very useful and these are my considerations: - This will prov