Re: [PHP-DEV] [VOTE] Named arguments

2020-07-11 Thread Levi Morrison
On Fri, Jul 10, 2020 at 2:42 AM Nikita Popov wrote: > > Hi internals, > > I have opened voting on the named arguments RFC: > https://wiki.php.net/rfc/named_params > > Voting will close on 2020-07-24. > > Regards, > Nikita I have decided to vote yes, though I'm a bit skeptical on a few points.

Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread Rowan Tommins
On 11 July 2020 22:47:21 BST, "Olle Härstedt" wrote: >You're misunderstanding. :) Yes, it should be shared, but not with the >same access level as the owner. If a dependent class closes the >connection it will cause spooky-action-at-a-distance somewhere else in >the program. I think that

Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread Max Semenik
On Sun, Jul 12, 2020 at 12:47 AM Olle Härstedt wrote: > You're misunderstanding. :) Yes, it should be shared, but not with the > same access level as the owner. If a dependent class closes the > connection it will cause spooky-action-at-a-distance somewhere else in > the program. Sorry, it's

Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread Olle Härstedt
2020-07-11 21:25 GMT, Larry Garfield : > On Sat, Jul 11, 2020, at 4:04 PM, Olle Härstedt wrote: > >> > I think that would do a far better job of addressing the >> > shared-mutable-state issue than reference counting, because it attacks >> > the >> > root problem rather than a symptom. >> > >> >

Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread Larry Garfield
On Sat, Jul 11, 2020, at 4:04 PM, Olle Härstedt wrote: > > I think that would do a far better job of addressing the > > shared-mutable-state issue than reference counting, because it attacks the > > root problem rather than a symptom. > > > > --Larry Garfield > > > > -- > > PHP Internals - PHP

Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread Olle Härstedt
2020-07-11 19:08 GMT, Larry Garfield : > On Sat, Jul 11, 2020, at 9:06 AM, Olle Härstedt wrote: >> Dear internals, >> >> I'd like to discuss the concept of ownership in PHP, from the point of >> view of a new interface UniqueInterface (or SplUniqueInterface or >> something), which will throw a

Re: [PHP-DEV] [CONCEPT][DISCUSSION] Instance as boolean

2020-07-11 Thread Larry Garfield
On Wed, Jul 8, 2020, at 11:39 AM, Josh Bruce wrote: > Link to working draft: https://bit.ly/php-0001 > > Discussion on implementing a means by which a class instance can > interacted with syntactically as a boolean. > > At this point in the discuss the only means

Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread Marco Pivetta
Hey Olle, On Sat, Jul 11, 2020 at 4:06 PM Olle Härstedt wrote: > Dear internals, > > I'd like to discuss the concept of ownership in PHP, from the point of > view of a new interface UniqueInterface (or SplUniqueInterface or > something), which will throw a UniqueException if refcount > 1. > >

Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread Larry Garfield
On Sat, Jul 11, 2020, at 9:06 AM, Olle Härstedt wrote: > Dear internals, > > I'd like to discuss the concept of ownership in PHP, from the point of > view of a new interface UniqueInterface (or SplUniqueInterface or > something), which will throw a UniqueException if refcount > 1. > > Use-case:

Re: [PHP-DEV] VCS Account Request: ondrejmirtes

2020-07-11 Thread Niklas Keller
Am Sa., 11. Juli 2020 um 08:04 Uhr schrieb Kalle Sommer Nielsen < ka...@php.net>: > Hi > > Den lør. 11. jul. 2020 kl. 08.55 skrev Ondřej Mirtes : > > Oh, thank you. Should I fill out this form? > https://wiki.php.net/?do=register > > Yes that is the one. Someone with wiki admin karma needs to

[PHP-DEV] [VOTE] zend.exception_string_param_max_len: Configurable string length in getTraceAsString()

2020-07-11 Thread tyson andre
Hi internals, Voting has started on https://wiki.php.net/rfc/throwable_string_param_max_len This proposes adding a new ini setting `zend.exception_string_param_max_len` that would allow changing the string byte limit to any value between 0 and 100, keeping the current default of 15 bytes.

Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread Olle Härstedt
2020-07-11 16:50 GMT, Rowan Tommins : > On 11 July 2020 16:13:24 BST, "Olle Härstedt" > wrote: >>Yes, the point is to be limiting. :) Just like with immutability, you >>apply certain limitations to avoid access abuse. > > > Taken to extremes, this is the "secure a server by encasing it in

Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread Rowan Tommins
On 11 July 2020 16:13:24 BST, "Olle Härstedt" wrote: >Yes, the point is to be limiting. :) Just like with immutability, you >apply certain limitations to avoid access abuse. Taken to extremes, this is the "secure a server by encasing it in concrete" strategy - the hard part about designing

Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread Max Semenik
On Sat, Jul 11, 2020 at 5:32 PM tyson andre wrote: > This is something that makes more sense in compiled languages like rust > that can enforce uniqueness at compile time, > and the dynamic nature of php makes that less practical. > Also, crucially, Rust has language features that require a

Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread Chuck Adams
On Sat, Jul 11, 2020 at 8:56 AM Rowan Tommins wrote: > (and, funnily enough, PHP 4 did for objects). The funny thing about it for me is that this behavior caused me to throw such a fit when I discovered it -- more to say burned by it -- that I swore off PHP forever at the time. Now I actually

Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread Olle Härstedt
2020-07-11 14:56 GMT, Rowan Tommins : > Hi Olle, > > On 11 July 2020 15:06:13 BST, "Olle Härstedt" > wrote: >>I'd like to discuss the concept of ownership in PHP, from the point of >>view of a new interface UniqueInterface (or SplUniqueInterface or >>something), which will throw a UniqueException

Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread Olle Härstedt
2020-07-11 14:55 GMT, tyson andre : >> Yes, it would be a dynamic uniqueness system, kind of. >> >> Another more flexible alternative would be to add magic methods at >> refcount = 1 and refcount > 1, possibly __owned() and __shared(int >> $refcount), for classes that implement a

Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread Rowan Tommins
Hi Olle, On 11 July 2020 15:06:13 BST, "Olle Härstedt" wrote: >I'd like to discuss the concept of ownership in PHP, from the point of >view of a new interface UniqueInterface (or SplUniqueInterface or >something), which will throw a UniqueException if refcount > 1. It's an intriguing idea, but

Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread tyson andre
> Yes, it would be a dynamic uniqueness system, kind of. > > Another more flexible alternative would be to add magic methods at > refcount = 1 and refcount > 1, possibly __owned() and __shared(int > $refcount), for classes that implement a TrackReferencesInterface or > similar. But this would

Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread Olle Härstedt
Thanks for your answers! Yes, it would be a dynamic uniqueness system, kind of. Another more flexible alternative would be to add magic methods at refcount = 1 and refcount > 1, possibly __owned() and __shared(int $refcount), for classes that implement a TrackReferencesInterface or similar. But

Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread tyson andre
Hi Olle Härstedt, > I'd like to discuss the concept of ownership in PHP, from the point of > view of a new interface UniqueInterface (or SplUniqueInterface or > something), which will throw a UniqueException if refcount > 1. It'd seem like it would cause a lot of places where UniqueException

Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread Chuck Adams
On Sat, Jul 11, 2020 at 8:06 AM Olle Härstedt wrote: > > Dear internals, > > I'd like to discuss the concept of ownership in PHP, from the point of > view of a new interface UniqueInterface (or SplUniqueInterface or > something), which will throw a UniqueException if refcount > 1. > > Use-case:

[PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1

2020-07-11 Thread Olle Härstedt
Dear internals, I'd like to discuss the concept of ownership in PHP, from the point of view of a new interface UniqueInterface (or SplUniqueInterface or something), which will throw a UniqueException if refcount > 1. Use-case: Mutable objects that cannot be shared (without (deep) cloning).

Re: [PHP-DEV] Wiki account request: ondrejmirtes

2020-07-11 Thread Ondřej Mirtes
Hello Nikita, yes, sure, I’ll have this in mind and participate more - be more vocal about my opinions and experience with static analysis and quality code when discussing new language changes. Thank you. On Sat 11. 7. 2020 at 10:19, Nikita Popov wrote: > On Sat, Jul 11, 2020 at 8:19 AM Ondřej

Re: [PHP-DEV] Wiki account request: ondrejmirtes

2020-07-11 Thread Nikita Popov
On Sat, Jul 11, 2020 at 8:19 AM Ondřej Mirtes wrote: > The main reason is to be able to vote on PHP RFCs. I've created and have > been maintaining PHPStan, a popular open-source static analyser. > > This submission is endorsed by Gabriel Caruso, a current release manager of > PHP 8. > > My

[PHP-DEV] Wiki account request: ondrejmirtes

2020-07-11 Thread Ondřej Mirtes
The main reason is to be able to vote on PHP RFCs. I've created and have been maintaining PHPStan, a popular open-source static analyser. This submission is endorsed by Gabriel Caruso, a current release manager of PHP 8. My wiki.php.net username is: ondrejmirtes Thank you. Ondřej Mirtes

[PHP-DEV] Re: VCS Account Request: gandung

2020-07-11 Thread PHP Group
VCS Account Rejected: gandung rejected by kalle /o\ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] VCS Account Request: ondrejmirtes

2020-07-11 Thread Kalle Sommer Nielsen
Hi Den lør. 11. jul. 2020 kl. 08.55 skrev Ondřej Mirtes : > Oh, thank you. Should I fill out this form? https://wiki.php.net/?do=register Yes that is the one. Someone with wiki admin karma needs to grant you the right write permission once that is done. When you have registered, then send off an