Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86079 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12067 invoked from network); 30 Apr 2015 07:07:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Apr 2015 07:07:29 -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.214.177 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.214.177 mail-ob0-f177.google.com Received: from [209.85.214.177] ([209.85.214.177:35095] helo=mail-ob0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1B/F3-27026-EA4D1455 for ; Thu, 30 Apr 2015 03:07:27 -0400 Received: by obcux3 with SMTP id ux3so37779045obc.2 for ; Thu, 30 Apr 2015 00:07:21 -0700 (PDT) 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=o+1z8XJc6x+GaqutmWF4ch4R9HT/rsRVreJ1MDxa0RI=; b=Z3nAoYUoMTC9Bei4CVswN10r+KiiVeDmVPrkdqycGnbstsWRqN9SVFGvCvZLMAOSY9 7r872u00XYemuMQmZNjkYL/d9bDEQR4H5vkloQUizrIKLQ04ocffVgXqqXt/9ROS9CoL 3K3OtJhd2Hp75Rf6QA94UNjjKnt1OVdftRqukZjtinwvDMmr+/mduMbf7FfRMIXrcYyV Y8MHQmllRZgGrc25/rpGbMRxhjuU+PqOdZFDVEl82JRm8J82xmZbSP47j6LtzdMe2cSE 9gz0VFKtTZnXWz0b5yyYLbup8zTWdcsgAf2QxM0MCTMfHiLKJL5/JoRpjl7UDFLds3Rr 3Wqg== X-Received: by 10.202.80.22 with SMTP id e22mr2254677oib.76.1430377641514; Thu, 30 Apr 2015 00:07:21 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.202.104.196 with HTTP; Thu, 30 Apr 2015 00:06:40 -0700 (PDT) In-Reply-To: References: <55401F31.9030703@gmail.com> <55416849.9010808@gmail.com> <554176D6.2030007@gmx.de> <55418CBE.6050609@gmail.com> Date: Thu, 30 Apr 2015 16:06:40 +0900 X-Google-Sender-Auth: Wx1qEanlv1-c03zgsqq8WY5QtCw Message-ID: To: Walter Parker Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a113d7e3a379d200514ebbf76 Subject: Re: [PHP-DEV] Adding "numeric" type hint From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a113d7e3a379d200514ebbf76 Content-Type: text/plain; charset=UTF-8 Hi Walter, On Thu, Apr 30, 2015 at 3:54 PM, Walter Parker wrote: > You didn't answer the question: why should we care? Is there enough of > user base now to care? IOT might be able to run PHP, but how many actually > do? And of the ones that do, is automatically half fixing the code that bad > programmers might write for the last remaining 32 bit platforms a good use > of our time? > > I don't suppose anyone objects view that IoT will be a big market in near future. The main problem is not only code IoT developers write, but libraries used by them. If you know embedded devices, they care every single dollar costs. I don't see any reason that they use 64 bit CPUs while 32 bit CPU is enough. We may say using PHP and it's library is not safe, so don't use it. I just don't like to say or anyone else say this. > I don't see the numeric type as fixing any of these problems... > Which is easier to advocate? - Use "string" type hints for record ID/etc and validate value by yourself. - Use "numeric" type hints for record ID/etc. or even - Use _weak_ mode "int" type hints (If it's relaxed) Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a113d7e3a379d200514ebbf76--