Re: RFC [Discussion]: Randomizer Additions

From: Date: Sat, 29 Oct 2022 19:21:21 +0000
Subject: Re: RFC [Discussion]: Randomizer Additions
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-118913@lists.php.net to get a copy of this message
On Sat, Oct 29, 2022 at 6:10 AM Claude Pache <claude.pache@gmail.com> wrote: > > > > Le 28 oct. 2022 à 23:43, Jordan LeDoux <jordan.ledoux@gmail.com> a > écrit : > > > > On Fri, Oct 28, 2022 at 12:30 PM Joshua Rüsweg via internals < > > internals@lists.php.net> wrote: > > > > Not to try and bikeshed further, but wouldn't > > getBytesFromChars or > > getBytesFromCharList be more clear while being nearly as > > accurate? > > > > Jordan > > > In the face of multibyte character sets such as UTF-8, I wouldn’t use > “char” to mean “byte” (even if, in practice, the most common use will be > strings of 1-byte chars). “Alphabet” or “string” might be ambiguous (is it > an alphabet of bytes or an alphabet of characters?), but at least they are > not contradictory. > > —Claude Well... perhaps. But "get bytes from character list" would do exactly what it says it will do, even from UTF-8 strings. It will use any of the bytes from the character list, even if one character in the list may contribute multiple bytes to choose from. It is *not* contradictory, just potentially confusing about the result Jordan

« previous php.internals (#118913) next »