Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98825 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44084 invoked from network); 19 Apr 2017 22:51:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Apr 2017 22:51:27 -0000 Authentication-Results: pb1.pair.com smtp.mail=adam.baratz@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=adambaratz@php.net; sender-id=unknown Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.169 as permitted sender) X-PHP-List-Original-Sender: adam.baratz@gmail.com X-Host-Fingerprint: 209.85.220.169 mail-qk0-f169.google.com Received: from [209.85.220.169] ([209.85.220.169:35343] helo=mail-qk0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B9/03-61625-DE9E7F85 for ; Wed, 19 Apr 2017 18:51:25 -0400 Received: by mail-qk0-f169.google.com with SMTP id f133so32996876qke.2 for ; Wed, 19 Apr 2017 15:51:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=O6RV/f4Q53p9qspkERHmYxtQGIZ/Ayq75dn2XZF8R4U=; b=kS8ZbDu6kYyudREev68J+R2znDc+Tcwl3t77pvjJk1D8sRL/0r/FjB6ShMOWli1ZP5 dSrmy2dMaQ50OpUbcFji4GCSlqgVCVD0l5VOXGbwuVo5Je978InU3j9CpH5mZDzexEU5 GVk9nqiZL/Qq7T/tVzFqNmUS6LGaGXW1IYMu31n7OJ0ZJULzUJzQq+fB6JSnPszjirWv klEhnZ2hjF5G0W6NwYNc6Pv3Tu0DQR1/YyGN/xeZARbUdatAZj80bQUj4OaYmhtjX06I cju5uBZRPZvIrJHnHXPv2sO+oIRhhysG6+xwi7OgG4XJYbFbjgAXRf+C1P0n5JUdwCZZ z3tQ== X-Gm-Message-State: AN3rC/7oUPZkHcQle8rR52NTj7KF3TP0JM9TafzADxiNeCVNnmL/IT4f eE34X9vryOteGybEmjzL5Q== X-Received: by 10.55.54.16 with SMTP id d16mr4613463qka.97.1492642282322; Wed, 19 Apr 2017 15:51:22 -0700 (PDT) Received: from mail-qk0-f178.google.com (mail-qk0-f178.google.com. [209.85.220.178]) by smtp.gmail.com with ESMTPSA id 137sm2905495qkd.48.2017.04.19.15.51.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Apr 2017 15:51:22 -0700 (PDT) Received: by mail-qk0-f178.google.com with SMTP id h67so33035493qke.0 for ; Wed, 19 Apr 2017 15:51:21 -0700 (PDT) X-Received: by 10.55.15.143 with SMTP id 15mr681913qkp.44.1492642281652; Wed, 19 Apr 2017 15:51:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.135.212 with HTTP; Wed, 19 Apr 2017 15:51:20 -0700 (PDT) In-Reply-To: References: <5e3e3e9b-f5b9-a19e-c4cb-6af0f5985d94@beccati.com> <8923084a-a357-91e9-44b5-52a4af0a5df1@beccati.com> <86e4681f-9030-80fc-896b-56255c4b84c7@beccati.com> Date: Wed, 19 Apr 2017 18:51:20 -0400 X-Gmail-Original-Message-ID: Message-ID: To: Matteo Beccati Cc: "internals@lists.php.net" , Andrea Faulds Content-Type: multipart/alternative; boundary=001a1146cc10f988dc054d8cdc6c Subject: Re: [PHP-DEV] [RFC] PDO Float Type From: adambaratz@php.net (Adam Baratz) --001a1146cc10f988dc054d8cdc6c Content-Type: text/plain; charset=UTF-8 > > I apologise if I've been harsh, but I am truly disappointed. I tried to > sway the RFC in a certain direction, that is conveying the pretty basic > notion that using floating points for fixed precision numbers is wrong: > there's lots of literature on that and especially why floats shouldn't > be used to represent money. The result was instead "floats all the > things!", which is indeed the opposite of what I was expecting. > The reason I went that way was I couldn't find a DB API that differentiates between the two types. They all represent them as a double, so it seemed like a needless distinction to create two PDO types, especially when PHP floats are the only built-in type for these numbers. Creating a dependency between bcmath and pdo (or something similar) feels awkward because it would offer false guarantees about what gets communicated to the DB server. In retrospect, I should've waited to open the vote to make sure everyone was on the same page about this conclusion. I assumed my explanation was clearer than it was. I have no specific suggestion. I'm just worried about the potential > disruptions of features that benefit a tiny portion of our users. > That's fair. I do realize ensuring "significant traction" for new features is emphasized in the RFC template. That said, small improvements are a nice way of signaling "active development," especially when very little has changed in PDO in a long while. The top Google results for "pdo float param" are three StackOverflow questions (first from 2009) asking why there isn't a float type, the PDOStatement::bindValue() documentation, and a feature request on bugs.php.net (from 2007). Whether or not this RFC is the right approach, I feel like there has been demand for this. It's a negative signal about the usefulness of PDO to have feature requests left open for 10 years. If they're outside the scope of what PDO should do, then let's update the documentation or whatever to be clearer about that. While I'm at it, could you please clarify the following for me: Why is > there so much effort devoted to the legacy dblib driver when pdo_sqlsrv > seems a much better replacement on paper? Googling for info didn't help, > so there surely must be something I'm missing here. Speaking only for myself: legacy reasons. My company uses MSSQL, we have hundreds of software engineers and a lot of systems that have been attached to pdo_dblib for a while. We want to get off it in the not-too-distant future, but for now I'm helping support it. As far as pdo_sqlsrv goes, it's still a "preview." The Linux ODBC driver it depends on only became supported in January of this year. Eventually, it could make sense to deprecate pdo_dblib in favor of something supported by Microsoft, but the timeline for that is unclear. Thanks, Adam --001a1146cc10f988dc054d8cdc6c--