Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99188 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53982 invoked from network); 25 May 2017 23:09:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 May 2017 23:09:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.65 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 74.125.82.65 mail-wm0-f65.google.com Received: from [74.125.82.65] ([74.125.82.65:34825] helo=mail-wm0-f65.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FC/5E-10292-90467295 for ; Thu, 25 May 2017 19:08:58 -0400 Received: by mail-wm0-f65.google.com with SMTP id g15so65214wmc.2 for ; Thu, 25 May 2017 16:08:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=gvCmEP6Kv7mvJfaOC/To35fCx97fRUOKFQJIkUkxCFA=; b=Az6wum1HlfkC6jeMHb5NGq9sTn6NdXN0zj7OQIPvMykctj5vZElyKBTzSEUorJ2w1G X7JFRFLKgINZxqQiwAAV6EzKH+ZQYvb0R7FUizPbrm5oS9joha++5nED1NYCRMczM2c1 H83gtmgiZ8rKLjjANncj+A3rx/4ndK/2zbjbpJ79vQNjxeig2NyKI3P90neTJPzYJN0y 8EIi2PcMGTQ02HM5JJW4lFyzGLA/NaSN6qxhUNEcSw+XCMI6PxL/z9qfSrz6f1AIJLUN Pj/wuYKt+23+doYXMNGEPIv+0oSqm2aATE9rs43Mjci54Y0t3DgH/GeczAdHx5xh+U5m By+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=gvCmEP6Kv7mvJfaOC/To35fCx97fRUOKFQJIkUkxCFA=; b=sTKCNHrxrYQ4MmbtfvapVyUl8F0j1cENml01l+Xa+FpS0A+xKZjX4rvVNZtBO3DI47 dmGUnOPYJ/ThTi8RYeKWHhcvCLvhZ7RvF1qWTwsBYHDK+ATRtOSD1LCvQQRaZYP4VNxA SbyUXnuzUFFVX/ciD4hWFCXMDO2vUfAVWshUlL8U8mLTBb+gOC+p+UVjANAgS6ILYrnz 29tLOE8FLM9zEIFJZymQIwRxQD1DLjYx+VDI4C4a3IKtstJQaZJucJBxDpVreZ5867ib Ocf72FmWo5ClPRWbCX1kOK5zsnMHNKF5fgmCuNMWzXjYM6QXUF1nmCyDrvjIWhawUGMZ vbgQ== X-Gm-Message-State: AODbwcAKxQNvoTNRZBRO+z88A7+jqGgbw+lqVb2qaMuUBjJ8GW1QthjU rzV2eAY7+zXDITTEQriUTtVefzfxTQ== X-Received: by 10.28.125.147 with SMTP id y141mr12010593wmc.87.1495753734823; Thu, 25 May 2017 16:08:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.161.147 with HTTP; Thu, 25 May 2017 16:08:34 -0700 (PDT) In-Reply-To: References: Date: Fri, 26 May 2017 01:08:34 +0200 Message-ID: To: Fleshgrinder Cc: php-internals , Nikita Popov Content-Type: multipart/alternative; boundary="001a114199740928ea0550614e42" Subject: Re: [PHP-DEV] [RFC] [Discussion] UUID From: ocramius@gmail.com (Marco Pivetta) --001a114199740928ea0550614e42 Content-Type: text/plain; charset="UTF-8" On Thu, May 25, 2017 at 6:41 PM, Fleshgrinder wrote: > On 5/25/2017 4:45 PM, Fleshgrinder wrote: > > RFC is finished > > > > https://wiki.php.net/rfc/uuid > > > > Would it be possible that we discuss the open issues, instead of trying > to get rid of the proposal completely? I will not back up anyways after > investing so much time. ;) > > https://wiki.php.net/rfc/uuid#argument_parsing Saw the discussion on github, and I wish that the argument parsing just behaved like a *NORMAL* PHP method. The following is perfectly valid: $crapTonOfUuids = array_map([UUID::class, 'v4'], range(0, 1000)); This would raise a lot of warnings if the API didn't behave like it does in userland (warning on too many arguments). A point was raised about BC compliance when adding parameters (future scope), well here's the news: stop adding arguments to existing functions, make some damn new functions/methods/classes (to whoever still thinks that adding arguments is a valid decision). > The argument parsing is a huge problem together with return type > constraints. Would love some feedback here from nikic. Even if this does > not get included, the issue will pop-up with the next implementation > that wants to use return type constraints. > > https://wiki.php.net/rfc/uuid#final_class > > I am not sure about the final class modifier. Would love some feedback > here from Ocramius. > The UUID type and specification is simple and clear. Also, a UUID is a data type with no real behavior. The only possible and valid scenario for subclassing would be to add semantic meaning because the developer invented a new type of UUID: that's to be excluded, as such an implementation (if relevant and secure) would land in core anyway in future PHP releases. Subclassing to alter behavior (generation/serialisation, if you want to call them "behavior") would be a mistake that could even lead to security issues, and it should be avoided. This class should be final, so keep it final, IMO. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --001a114199740928ea0550614e42--