Re: [PHP-DEV] ext/pgsql: pg_put_line deprecation proposal

2024-05-20 Thread David CARLIER
Hi Matteo, On Mon, 20 May 2024 at 14:08, Matteo Beccati wrote: > Hi, > > Il 20/05/2024 14:03, David CARLIER ha scritto: > > I would like to know if it would be fine to deprecate pg_put_line > > . > > > > Reasoning is PQPutLine is part of the obsolete list of calls for COPY >

Re: [PHP-DEV] [DISCUSSION] Checking uninitialized class properties

2024-05-20 Thread Erick de Azevedo Lima
> If we're talking syntax and introducing new keywords anyway, why not go with a new language construct like `is_initialized($obj->property)` ? It was one of my suggestions at the beginning of the thread. Also, I said that I'd love the "$objectVar->property is uninitialized" (answering to Larry) b

Re: [PHP-DEV] [DISCUSSION] Checking uninitialized class properties

2024-05-20 Thread Ilija Tovilo
On Sat, May 18, 2024 at 4:41 PM Rowan Tommins [IMSoP] wrote: > > On 18/05/2024 11:52, Luigi Cardamone wrote: > > Are there any downsides in adding a > > specific syntax to check if a property > > is initialized with any value? > > In my opinion - and I stress that others may not share this opinion

Re: [PHP-DEV] [DISCUSSION] Checking uninitialized class properties

2024-05-20 Thread Juliette Reinders Folmer
On 20-5-2024 19:41, Erick de Azevedo Lima wrote: > All of which is to say that, yes, there are use cases for an "is this property initialized" check that is less fugly than the get_object_vars() hack I have to rely on now. I'd like to see this: if ($objectVar->property is uninitialized) { ...

Re: [PHP-DEV] [DISCUSSION] Checking uninitialized class properties

2024-05-20 Thread Luigi Cardamone
On 18/05/2024 18:08, Rowan Tommins [IMSoP] wrote: > > In my opinion - and I stress that others may not share this opinion - > the entire concept of "uninitialized properties" is a wart on the > language, which we should be doing our best to eliminate, not adding > more features around it. > > As

Re: [PHP-DEV] [DISCUSSION] Checking uninitialized class properties

2024-05-20 Thread Erick de Azevedo Lima
> All of which is to say that, yes, there are use cases for an "is this property initialized" check that is less fugly than the get_object_vars() hack I have to rely on now. I'd like to see this: if ($objectVar->property is uninitialized) { ... } or/and: if ($objectVar->property is initialized)

Re: [PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-20 Thread Robert Landers
On Mon, May 20, 2024 at 6:58 PM Larry Garfield wrote: > > On Sat, May 18, 2024, at 6:15 PM, Robert Landers wrote: > > >> I think an important question to answer here is what we want to have as > >> our definition of "package". > >> > >> 1. Should the package be defined by the namespace? If so, an

Re: [PHP-DEV] [DISCUSSION] Checking uninitialized class properties

2024-05-20 Thread Larry Garfield
On Sat, May 18, 2024, at 5:41 PM, Rowan Tommins [IMSoP] wrote: > On 18 May 2024 17:13:49 BST, Larry Garfield wrote: >>However, that breaks down with readonly properties, which are not allowed to >>have a sentinel. Uninitialized is their sentinel, for better or worse. > > Sorry, I don't understan

Re: [PHP-DEV] [Discussion] "Internal" attribute and warning

2024-05-20 Thread Larry Garfield
On Sat, May 18, 2024, at 6:15 PM, Robert Landers wrote: >> I think an important question to answer here is what we want to have as our >> definition of "package". >> >> 1. Should the package be defined by the namespace? If so, anyone can put >> code into any namespace; it's not even hard to add

Re: [PHP-DEV] ext/pgsql: pg_put_line deprecation proposal

2024-05-20 Thread Matteo Beccati
Hi, Il 20/05/2024 14:03, David CARLIER ha scritto: I would like to know if it would be fine to deprecate pg_put_line . Reasoning is PQPutLine is part of the obsolete list of calls for COPY purpose  s

[PHP-DEV] ext/pgsql: pg_put_line deprecation proposal

2024-05-20 Thread David CARLIER
I would like to know if it would be fine to deprecate pg_put_line. Reasoning is PQPutLine is part of the obsolete list of calls for COPY purpose since the PostgreSQL protocol 3.0 version (supported since postgresql 7.4 relea