Re: [RFC] [Discussion] UUID
| From: | Ben Ramsey | Date: | Wed, 24 May 2017 20:12:06 +0000 |
| Subject: | Re: [RFC] [Discussion] UUID | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-99160@lists.php.net to get a copy of this message | ||
On Wed, May 24, 2017 at 2:47 PM, Marco Pivetta <ocramius@gmail.com> wrote:
>
> On Wed, May 24, 2017 at 8:39 PM, Fleshgrinder <php@fleshgrinder.com> wrote:
> >
> > Furthermore, I carefully crafted everything to be as close to userland
> > as possible. No magic, none at all. I use default PHP built-in stuff for
> > everything. Even the parameter parsing is 1:1 as it would be if you
> > would define the very same class in PHP.
> >
> > I will extend my signature with "No Magic!" now. ;)
> >
>
> Perfect, this absolutely makes it a huge :+1: on my side.
>
> Last thing I'd suggest is to grab Ben Ramsey and get him to check the patch
> :-)
>
I'll take a look at the patch soon. If this is accepted to the core,
I'll probably add an adapter to ramsey/uuid that wraps this
implementation. The point of the "over engineering" there is to provide
choice. Some users want to generate bytes from sources other than
random_bytes() (i.e., libsodium) or encode UUIDs in different ways
(i.e., ordered time). A UUID generator in the core will only help to
improve ramsey/uuid, providing more choice and better performance.
I may split out the less-used adapters and codecs into separate
components in version 4 or 5 of ramsey/uuid, though, since most users
don't need anything other than the default.
-Ben