Re: Typed constants revisited
| From: | Guilliam Xavier | Date: | Fri, 25 Mar 2022 16:55:32 +0000 |
| Subject: | Re: Typed constants revisited | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-117429@lists.php.net to get a copy of this message | ||
> I intentionally left
abstract out of public
> const bool CAN_FLY; in the
> abstract class for consistency with the implementation with
>interface,
> which would also have to be public const bool CAN_FLY;.
> Currently
> abstract is only used in front of methods `abstract function
> doThing():
> bool;`. Open to discussion - which way is ideal or preferred? That could be
> included as a subset of an RFC vote if a consensus during discussion isn't
> reached.
>
I understand, but note that methods are implicitly abstract in an
interface, but it must be explicit in an abstract class; and since I see
the proposed feature mainly as a "replacement" for abstract static methods
[whose all implementations just return a literal value]... (anyway, not
super important)