Re: [RFC] [Discussion] Literal Scalar Types
| From: | Larry Garfield | Date: | Mon, 15 Jun 2026 20:11:16 +0000 |
| Subject: | Re: [RFC] [Discussion] Literal Scalar Types | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-131302@lists.php.net to get a copy of this message | ||
On Mon, Jun 15, 2026, at 2:45 PM, Seifeddine Gmati wrote:
> Hi Tim,
>
> I think I might agree here, and others have raised the same concern on
> Discord. Dropping float literals for now simplifies the RFC, so I am
> inclined to do that, though I would like to hear what others think
> before removing them.
We debated allowing float as a backing type for enums, and eventually decided against it for a
similar reason: It's not stable or discrete enough to be useful, and no other language we
looked at supported them.
I'm still undecided on the RFC as a whole (I need to fully read it first), but would support
limiting the literals to just int and string.
--Larry Garfield