Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80422 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36571 invoked from network); 12 Jan 2015 19:44:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jan 2015 19:44:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.44 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.192.44 mail-qg0-f44.google.com Received: from [209.85.192.44] ([209.85.192.44:42509] helo=mail-qg0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 84/E3-04585-42424B45 for ; Mon, 12 Jan 2015 14:44:37 -0500 Received: by mail-qg0-f44.google.com with SMTP id q107so19269265qgd.3 for ; Mon, 12 Jan 2015 11:44:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=7CXV6Fw3Dyrm/J32qm7Q2LAYflmnLpeq0GJdmPfFGzA=; b=iqX7G/pLfgiWMstzcRIhLriVm/kHrNFmBOGVV8wjsooaoOPcA7Xq9Y5O/y3Ura4xzO KovMNF9W4UNPC6M7gMVbzvvt15R07jvWguz9lC846ThfuoSqdDWr7JQ8x0/jH/HjzRkw gNLjy4D9Tf/qKyna8PsE8F8AMUvSV4uBBQ4Q03oqq6zjnQNZuI9KMPCIvCLoA/Qdrjl6 +p27qLKwgJ52pJE/+Cll8KOtpx44sjlU/Es9EwX8nolDjjR+8jKeii+9IWRXfetfpqPi AW1U2SUVZ8HPCpzoaDnW0xjENg01HCgw2K45nD4Aq0tML4zSGWXWouKJXzGAsnu4AnST BdKA== X-Received: by 10.140.98.168 with SMTP id o37mr49943337qge.39.1421091874351; Mon, 12 Jan 2015 11:44:34 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.93.70 with HTTP; Mon, 12 Jan 2015 11:43:54 -0800 (PST) In-Reply-To: <786231F5-DE56-4E32-8251-CD6CD4FE12DB@ajf.me> References: <54B30DB9.3000003@seld.be> <76B8D342-43E7-42E6-AD82-FCF7C5CA8658@ajf.me> <786231F5-DE56-4E32-8251-CD6CD4FE12DB@ajf.me> Date: Tue, 13 Jan 2015 04:43:54 +0900 X-Google-Sender-Auth: kjZm2CwZw9Vewg73BUFfnCEzjnQ Message-ID: To: Andrea Faulds Cc: Jordi Boggiano , PHP Internals List Content-Type: multipart/alternative; boundary=001a113a91785d333a050c79bcec Subject: Re: [PHP-DEV] rand(), mt_rand() and limits From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a113a91785d333a050c79bcec Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Andrea, On Mon, Jan 12, 2015 at 10:06 AM, Andrea Faulds wrote: > > On 12 Jan 2015, at 00:55, Yasuo Ohgaki wrote: > > > > It works, but I prefer to have procedural API also (and OO API if it is > needed.) > > I like multi paradigm programming language. > > I don=E2=80=99t see the point of a =E2=80=9Cprocedural API=E2=80=9D here,= it=E2=80=99d just be a set of > thin wrappers around the OOP API. > > Multi-paradigm means actually providing different approaches. Every time > PHP has had both a =E2=80=9Cprocedural=E2=80=9D and =E2=80=9COOP=E2=80=9D= API so far, it=E2=80=99s been nothing of > the sort, the =E2=80=9Cprocedural=E2=80=9D API has been the OOP one in di= sguise. There is > zero functional difference between $foo->bar($baz, $qux); and foo_bar($fo= o, > $baz, $qux); and we should stop pretending there is one. > > Are people seriously scared off by the syntax of =E2=80=9COOP=E2=80=9D AP= Is or something? > I just don=E2=80=99t get it. Surely it is not hard to explain that mysql_= query and > $mysqli->query are exactly the same thing?! > I just would like to make sure that there is both. We are better off with both OO and procedural API like Python, IMO. > > > BTW, difference between 32bit and 64bit platforms would not be a proble= m > > as long as it is documented. > > It=E2=80=99s not necessarily a =E2=80=9Cproblem=E2=80=9D, but I don=E2=80= =99t see why 64-bit integers > shouldn=E2=80=99t be properly supported on 64-bit systems. Nice idea. Let's have 64 bit random in 32 bit systems. (i.e. same seed =3D same sequen= ce as long as mix/max fits in range=EF=BC=89 Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a113a91785d333a050c79bcec--