Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Robert Landers
On Tue, Feb 6, 2024 at 9:22 PM Larry Garfield wrote: > > On Tue, Feb 6, 2024, at 7:56 PM, Григорий Senior PHP / Разработчик Web wrote: > > Thanks Larry, I will read both articles next weekend. > > > > Am not even talking about changing `throw` to `raise`. > > > > Am talking only about: > > - produ

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Григорий Senior PHP / Разработчик Web
Yes, that was the second build of the error bag I presented in the github ticket. First one was a Trait that added an error bag as property in class and returned an array with two results. The trouble was you have to refactor all places you used your function doesn't matter, want you or not. And

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Robert Landers
On Wed, Feb 7, 2024 at 11:27 AM Григорий Senior PHP / Разработчик Web <6562...@gmail.com> wrote: > > Yes, that was the second build of the error bag I presented in the github > ticket. > First one was a Trait that added an error bag as property in class and > returned an array with two results. >

Re: [PHP-DEV] Why are serialized strings wrapped in double quotes? (s::"")

2024-02-07 Thread Ilija Tovilo
Hi Sandy On Tue, Feb 6, 2024 at 9:19 PM Sanford Whiteman wrote: > > I'd like a little background on something we've long accepted: why > does the serialization format need double quotes around a string, even > though the byte length is explicit? > > Example: > > s:5:"hello"; > > All else being

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Larry Garfield
On Wed, Feb 7, 2024, at 10:21 AM, Robert Landers wrote: >> I think there's a subtle but important difference here between what you're >> describing as the problem and what you implied the solution was (which I >> then ran with). >> >> What you're talking about is trying to change the error hand

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Григорий Senior PHP / Разработчик Web
Analyzing the problem on a single level operation is incorrect. New code and simple operations are fully covered with exception/try/catch flow. The main point i tried to attract your attention is that if you working in batches/queues/pipelines you still need errors collection, and if you made erro

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Григорий Senior PHP / Разработчик Web
As I mentioned above - javascript pipelines (named `Promise` and `Thenable`) are great examples when exceptions are a bad choice. Btw, not "bad", but "choice to stop one step of the chain only". If any step of chain/foreach throws an exception - it will break all code. Should break one step. That'

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Larry Garfield
On Wed, Feb 7, 2024, at 12:55 AM, Alex Wells wrote: > On Tue, Feb 6, 2024 at 7:14 PM Larry Garfield > wrote: > >> These two samples *are logically identical*, and even have mostly the same >> performance characteristics, and both expose useful data to static >> analyzers. They're just spelled dif

Re: [PHP-DEV] Why are serialized strings wrapped in double quotes? (s::"")

2024-02-07 Thread Sanford Whiteman
> I don't have the historical context, but I'm assuming that's it. PHPs > serialization format is not efficient, and I don't think that was ever > the primary focus. Thanks Ilija. That'll have to suffice unless someone remembers a specific decision (searching all the old Internals posts nothing ca

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Григорий Senior PHP / Разработчик Web
I still don't understand why the problem is signature and moving a simple throw statement to return type, and then rewriting the catch statement to oneline-r. I am completely satisfied with the php way of working with method signatures except non-critical cases: - still no `undefined` type, so som

Re: [PHP-DEV] Why are serialized strings wrapped in double quotes? (s::"")

2024-02-07 Thread Jim Winstead
On Tue, Feb 6, 2024, at 12:19 PM, Sanford Whiteman wrote: > Howdy all, haven't posted in ages but good to see the list going strong. > > I'd like a little background on something we've long accepted: why > does the serialization format need double quotes around a string, even > though the byte leng

Re: [PHP-DEV] [RFC][Vote] Promote the PHP Foundation

2024-02-07 Thread Jim Winstead
On Fri, Feb 2, 2024, at 12:57 AM, Jorg Sowa wrote: > Hello Jim, > shoudl this RFC be placed into the Policies repository as it was accepted? > > https://github.com/php/policies I'm not sure that it's necessary, but if it fits in there somehow I have no problem with it. I didn't see this as an ado

Re: [PHP-DEV] Why are serialized strings wrapped in double quotes? (s::"")

2024-02-07 Thread Sanford Whiteman
Nice work, Jim. >I enjoy spelunking in the history of the project, so I did some digging. It >looks to me like Kris didn't quite get the history correct. Boris did propose >a form of serialization first, but it looks like what became serialize() and >unserialize() came into the project another way

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Alexander Pravdin
On Thu, Feb 8, 2024 at 2:29 AM Григорий Senior PHP / Разработчик Web <6562...@gmail.com> wrote: > I still don't understand why the problem is signature and moving a simple > throw statement to return type, and then rewriting the catch statement to > oneline-r. Sorry for answering not directly to

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Григорий Senior PHP / Разработчик Web
JIT I've had this solved, not only the application, but a way to. Am sharing my experience without labels "bad", "cood", "truth" or "correct", like you did. Your arguments are based on your principles and I don't see in your words any point to discuss, so - use pm or share here secret of error-fr

Re: [PHP-DEV] Why are serialized strings wrapped in double quotes? (s::"")

2024-02-07 Thread Michał Marcin Brzuchalski
Hi Sandy, wt., 6 lut 2024 o 21:19 Sanford Whiteman napisał(a): > Howdy all, haven't posted in ages but good to see the list going strong. > > I'd like a little background on something we've long accepted: why > does the serialization format need double quotes around a string, even > though the b