Re: Pre-RFC Discussion: Support for String Literals as Object Properties and Named Parameters in PHP

From: Date: Mon, 02 Sep 2024 16:42:53 +0000
Subject: Re: Pre-RFC Discussion: Support for String Literals as Object Properties and Named Parameters in PHP
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-125390@lists.php.net to get a copy of this message
On 02.09.2024 at 16:51, Mike Schinkel wrote: > Generally I am one who welcomes new feature ideas, but I fear that string literals as object > properties would break a valuable assumption that all properties must be a valid identifier. Without > that assumption I fear many things that would become more complex. Is that so? See <https://3v4l.org/bZTFi>. > So I am sympathetic to the desire to improve the language. However I fear this specific change > would create more pain than pleasure. Better IMO to look for less disruptive solutions to achieve > the same goals. For example, if the Enum+Attributes approach meets your needs aside from having too > much boilerplate, maybe we could enhance PHP to have less of that boilerplate? ACK Christoph

« previous php.internals (#125390) next »