Re: [RFC] is_literal

From: Date: Sun, 13 Jun 2021 19:46:47 +0000
Subject: Re: [RFC] is_literal
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-114846@lists.php.net to get a copy of this message
Hi!

From what I understood reading the RFC, this looks like a new type,
"literal string", specifically a subtype of "string". Have you
considered instead of forcing library authors to use is_literal()
check everywhere on their input boundary and making sure no place
where input is passed, is forgotten, to let them type their whole
codebase, including internal, against the new literal-string type,
which would be enforced by PHP all the time? From my perspective as a
PHP developer, it would serve clearer intent than only checking in a
few places which presumably may take user input, i.e. you could
explicitly state "this function does only work with literal strings".

Regards,
someniatko


Thread (69 messages)

« previous php.internals (#114846) next »