Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78233 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69259 invoked from network); 22 Oct 2014 18:31:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Oct 2014 18:31:12 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.45 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.45 mail-wg0-f45.google.com Received: from [74.125.82.45] ([74.125.82.45:56272] helo=mail-wg0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 39/90-63701-EE7F7445 for ; Wed, 22 Oct 2014 14:31:11 -0400 Received: by mail-wg0-f45.google.com with SMTP id m15so4344008wgh.4 for ; Wed, 22 Oct 2014 11:31:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=3K8jhQZd+cW6ERlPBJaPdHS5ufD5QyMB4GytaoCxKAY=; b=Kb1WV7ti4IkcB/UfzjYBWz47dxEKl4fH35LNB5qYnWmopAGmHrRr4jyvgt/h1+hqwB UXTfFK/mqa+ydaXWhWpyg1zu+mnGrI8kcUq2dz8tmLrjsNH1hy3pb91g0PfA3LT0dxae rubanFkhEab5GsGipazsdlX0C5i6DFyD3XGjMFhPUiz8eIRVUhynnKBlALXmXFHBAUBK bEy33+JFhCzp79vm01slG2bVp3AVaIFC3FrtmJt359CqSNdS9H9NHnwrHHW7+pttPkYb RRNHiN0KWjbd7V1q+nwFvr6q4P0jSDKUyD+xZRGawI8sP7DB8gwB5zInMTydqOk8zNLk +JGQ== X-Received: by 10.180.8.233 with SMTP id u9mr7645449wia.19.1414002667034; Wed, 22 Oct 2014 11:31:07 -0700 (PDT) Received: from [192.168.0.177] ([62.189.198.114]) by mx.google.com with ESMTPSA id bi7sm2798338wib.17.2014.10.22.11.31.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Oct 2014 11:31:06 -0700 (PDT) Message-ID: <5447F7E9.1050502@gmail.com> Date: Wed, 22 Oct 2014 19:31:05 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: internals@lists.php.net References: <66B7B28C-2651-4A71-AC2A-55D4C7BB3DDC@ajf.me> <866A39C7-6F11-408D-8BCA-594BA22E8569@ajf.me> <5447682B.2080100@sugarcrm.com> 2b3cf64265e54aaaa404198da2b58ded@mail.gmail.com <3a665ef1f9227f6f8b1181575d894b39@mail.gmail.com> In-Reply-To: <3a665ef1f9227f6f8b1181575d894b39@mail.gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Safe Casting Functions From: rowan.collins@gmail.com (Rowan Collins) Zeev Suraski wrote on 22/10/2014 09:34: > If we called them something like lossless_float() - that provides developers > with the necessary heads-up that this will not use the standard conversion > rules they're familiar with. It also gives them a good indication as to how > it may be different from those standard rules. I actually quite like lossless_* as a naming convention for these; the distinction between intval() and to_int() strikes me as a little vague, and over-abbrev'd. Andrea Faulds wrote on 22/10/2014 19:20: > I’m wary of making the names much longer. The less convenient they are, the less likely they’ll be used… so the less likely the primary goal of the RFC would be achieved. I take the point here, but think an *obvious* name, and a lack of confusing options, are the main driving factors here, rather than the number of keyboard presses required. Basically, a function that won't require me to look in the manual every time I want to use it. Regards, -- Rowan Collins [IMSoP]