Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114442 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 44121 invoked from network); 12 May 2021 14:31:11 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 May 2021 14:31:11 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 21BB41804B5 for ; Wed, 12 May 2021 07:39:14 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 12 May 2021 07:39:13 -0700 (PDT) Received: by mail-ed1-f46.google.com with SMTP id l7so27409693edb.1 for ; Wed, 12 May 2021 07:39:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=w7cX//N0yC3dahzI0uLweR6l8pbAEqeVDjT31teIl/g=; b=AIeE0TdRJileddd/Zw4xS2YxyGBKHRt2/ww1LAhyTMwgZVeUC342bGUszc3UMQBOaq b5Gpho6dnozedNmejSZM/CGVj8kwnAxVYX88c8WuXMmSh5XOTM5LUsij2xv9FpMo1JAU fJyYZ+tV2WwA1UPvfTaa2Z4V+I8703yztLEVSZZF3RQmCRwVjXd2Xmg07ZkT27vxGR44 hZJsf+On0xUF0HVXKqcvdN1jebMAt257L89HTnNZJp3QqdkE5TjHi7Ybw0NHFjaDKmLB xmLpvy3bCXQRF+dHng3uXpOZFTs4Qg0miMdESj3brj+0hzywAbXa+b7AxwhIYByJVpwI +JFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=w7cX//N0yC3dahzI0uLweR6l8pbAEqeVDjT31teIl/g=; b=a3vkuGSN/ADFSpjU8fxTfwHkeSjK21yKb6NqLa8o1P5b8vSiJYjGCS0ONDdDkwp0Kk dS1dR/KyQjvrXyCcYuxS5gIYL9/gSiIO+f6YYMMhM0jRqMxBJfLDRItgTUunzaEfHU94 5wtAKQKwgkPnx18Z13nUuK7tcFDAIEAeuQd3wBOCKSz47dtnhwDPnVmitKXXU/exuhaO dOR7U02s4UoCbPUTR0mnOr992CJvKFr9ImFGeP+R42E8MjWe//g51GtwNqgVslxt7bBQ QxPqBJCQFvt6cPbq/oa+Mb8I8snibyQM9ek1rYiAaiqR2VhDLc23kRTUGzTDjMGAeBG3 m2mQ== X-Gm-Message-State: AOAM5322HdYFt0YPg0uTZXmGMLSJ/Ck/bEwUtbvYtl+XI+9+4oWZZcZ9 13Sofii1/HwN18DmjfIHApC5jCgJ8tFZgtOdlZwbkGXw4v8= X-Google-Smtp-Source: ABdhPJyd7Sh9KFqjFoGhN9PXFJj6lFvkgXeTOh67DCPpTBMD3n11Is2/T6KhcC6WUFyaP+9cwL0n11Ei23hVoF9DfRk= X-Received: by 2002:a05:6402:3594:: with SMTP id y20mr43347362edc.226.1620830351488; Wed, 12 May 2021 07:39:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 12 May 2021 23:39:00 +0900 Message-ID: To: PHP internals , Levi Morrison Content-Type: multipart/alternative; boundary="0000000000005779fe05c222f9de" Subject: Re: [PHP-DEV] Discussion: Object-scoped RNG From: zeriyoshi@gmail.com (Go Kudo) --0000000000005779fe05c222f9de Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I would like to change the proposal to one based on the original proposal (pecl orng) instead of the confusing RFC proposal. https://github.com/zeriyoshi/php-ext-orng But, I am a bit skeptical about bc-break. It is possible to implement it without destroying the current behavior, but keeping the old implementation may lead to userland implementations that mess up the state of RNGs in the future. I haven't decided whether to include it in the next RFC, but we think we need to deprecate all functions that use RNGs with global state (shuffle(), array_rand(), str_shuffle()) in the future. The API in the rejected RFC was confusing because of my attempt to solve this problem. I've tried to maintain maximum interoperability and usability= . Also, I am happy to see that Nikita's rules for namespace assignment to extensions have been approved. I'm going to use the `RNG` namespace. 2021=E5=B9=B45=E6=9C=8812=E6=97=A5(=E6=B0=B4) 4:46 Levi Morrison : > On Tue, May 11, 2021 at 6:58 AM Go Kudo wrote: > > > > Hi internals. > > > > I previously proposed an object scope RNG implementation inside. > > However, the RFC was rejected after a vote. > > > > https://wiki.php.net/rfc/object_scope_prng > > > > Vote: https://externals.io/message/113888 > > Discussion: https://externals.io/message/112819 > > > > As per my previous proposal, PHP is currently in a very unclear state > > regarding the random number implementation. > > > > So I would like to ask a few questions. > > > > - Do you think that PHP needs an object-scoped random number > > implementation? And why? > > - If the API in the previous RFC was improved and voted on again, would > you > > be willing to vote for it? > > - What issues do you think should have been resolved between proposal a= nd > > ballot in the previous RFC? > > > > I would like a variety of opinions. > > > > Translated with www.DeepL.com/Translator (free version) > > > > Regards, > > Go Kudo > > I would like to see an extension that doesn't contain the > backwards-compatibility breaking changes in the RFC. Every function, > type, and constant should be namespaced according to the extension. > For instance, if you want to call it `ext/rng`, then the namespace can > be `rng` or `Rng` or `RNG`.No exceptions for now! The previous > proposal had namespace things, and un-namespaced things, and breaking > changes, and I don't think that made a cohesive proposal. > > Also, php-src generally doesn't suffix interfaces with the name > "Interface". Please provide another name for `RNGInterface`, like > `RandomNumberGenerator` or `RNG`. > --0000000000005779fe05c222f9de--