Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114567 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 25056 invoked from network); 24 May 2021 15:05:53 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 May 2021 15:05:53 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C2BCC1804F8 for ; Mon, 24 May 2021 08:16:56 -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=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, 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-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (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 ; Mon, 24 May 2021 08:16:56 -0700 (PDT) Received: by mail-qt1-f176.google.com with SMTP id v4so20861687qtp.1 for ; Mon, 24 May 2021 08:16:56 -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 :cc; bh=/iQJrA9MOTpoQQLYS1tKH3aO0DlQ9jE8Hlu4YQig3tY=; b=Uv0HywkYPdz6anvrccnf6EwyN4tdtEGB7sJ4iaNK9an8G7xGFCsCSl4acUyQDBtDLG V8jFSvbesONsN6HcabdSg+9WRkRlBi5vR8BC9ZS8QCC/d3xYaBkF5f5Oz7ZoaeOfm8pJ fkOdC0Jn/7iUWx1Y7SVEKUCd8j1ZN2I1VdTvx91Px5mxEnRZeMFK7kb4Ws/GzGC4xn4M RJOVjoMf7i87adFzgEdbutyhat7dl0diRx+FBZlfoGFUN5qdjG/hFg065QghzcWUBQL9 W3roaAOLixVrfB2HdrFarWnoPzGwHB8crbDcl0m42pSJ6lFQ4n9nwIImK28VDjX7i6Nd 6vyA== 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:cc; bh=/iQJrA9MOTpoQQLYS1tKH3aO0DlQ9jE8Hlu4YQig3tY=; b=ToIxDFSJFH1W2JcUNAOLF9cr9WLFi3SjRMr5UZbyfTvNdI4eU1endTXXWoRKMVjlxY zBkdKBJ6ge/XmlkT4IID0EnTWweBsup1MlUdS6Ti0F9Gn/44pZ5XumTICuZn1AGzbwon k5HXHG3pYpjhjPsEiG9f+fyc0FwDjLnhL03kyDTPGGM7cwCFRi6WYg2Mvon5SG4y4Dis skyMSbV5ky8yDUMl/XLvBASP8DeR4tB4ls2gkX45sFadpRcrJ5KTt5NmFbtVgi6zrZVi 1K+K/dQC3VmhPty9gaQqCM+ngKx7O1aQ8cb7/f18XBLafyPoRGMHXMI001cu4EYZ06Xg usMA== X-Gm-Message-State: AOAM533OyhaLXxVcTV1zL2HGNwsDzvu5uVbhMB7XHCLnWgUXbe6bzssW FInPi5BeOQD8ChSUgbSueoB8lDUL4YyyXVfn3Gg= X-Google-Smtp-Source: ABdhPJwcv/ZYC/VjtUNllwswYefRKNgAQcuU69zX9aQTkX/+L355QHf3JyruybHHKv1ElcIpkixBsMLCl7xqiSQFEiU= X-Received: by 2002:ac8:5d01:: with SMTP id f1mr26848651qtx.105.1621869414950; Mon, 24 May 2021 08:16:54 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 24 May 2021 16:16:44 +0100 Message-ID: To: Guilliam Xavier Cc: Go Kudo , PHP internals Content-Type: multipart/alternative; boundary="00000000000059aa0505c314e6aa" Subject: Re: [PHP-DEV] Re: [RFC] [Draft] Add Randomizer class (before: Add RNG extension) From: tekiela246@gmail.com (Kamil Tekiela) --00000000000059aa0505c314e6aa Content-Type: text/plain; charset="UTF-8" Hi Go Kudo, This proposal looks much better. Well done. What would help is if you showed the examples from the introduction section rewritten using the new API. I don't think it makes sense to make parameters (?int $min = PHP_INT_MIN, ?int $max = PHP_INT_MAX) nullable. Regarding the method names, I would be afraid of naming them using PHP keywords. Maybe they should be called getInt and getBytes? Why isn't the new class in a new extension? Is there a reason why it should go into core? Regarding the name, I think Random or Randomizer is fine, but I would avoid acronyms. Regards, Kamil --00000000000059aa0505c314e6aa--