Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties

From: Date: Wed, 22 Nov 2023 15:27:19 +0000
Subject: Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-121758@lists.php.net to get a copy of this message
> Le 21 nov. 2023 à 00:08, Rowan Tommins <rowan.collins@gmail.com> a écrit : > > I've revised the RFC; it now proposes to keep the implicit "= null" for untyped > properties, although I'm still interested in suggestions for other strategies around that. Hi, If you really want untyped property not being implicitly initialised to “null” in the long term, here is my suggestion: 1. In 8.next, deprecate untyped property without initialiser, suggesting to add an explicit “= null” (one deprecation notice per class definition containing at least one untyped property without initialiser); 2. In 9.0, an untyped property without initialiser becomes a syntax error; 3. Later, reintroduce untyped property without initialiser with the new semantics. —Claude

« previous php.internals (#121758) next »