Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37419 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14089 invoked from network); 3 May 2008 01:04:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 May 2008 01:04:42 -0000 Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=rquadling@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.146.182 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 209.85.146.182 wa-out-1112.google.com Received: from [209.85.146.182] ([209.85.146.182:15310] helo=wa-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 45/FA-55202-82ABB184 for ; Fri, 02 May 2008 21:04:42 -0400 Received: by wa-out-1112.google.com with SMTP id v27so943951wah.17 for ; Fri, 02 May 2008 18:04:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=SjD2stDAekXpG5ErMHpA4t0fb8Rx5b7L3AZ3+LasEb0=; b=RSfWT1qj2omdHHMgIc7rBI0pcwLoM63hIzTDnnlUka5Sjqd99K6Eb77aHcJpyCWcmVOgjZmo/ZrIlsr+qhFAXxNlUWruUC5QLPJmlVuAWAuxN2dAy03iVO+i3sWtIYCOPCh/8cnkPhAhowxdxO/v6rpydThMEHvEzAHrzqmxwUQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NJl+KufUi4AvSOq/g7pQSZEJ5RvAoVaIZss9ZGObZo8zfsYrkYHVt0d634R/xlRcLxK/rUs6sCM1qmIT6u26qK0Zy+s3gNceyCqoLs0xc+Wj2zEEFWzRqhfUje9TJqaoNPLeD5Z3pwzwWPXeFdVOcv2AbxrQ6Z7j3+R0X5gn45Q= Received: by 10.114.92.6 with SMTP id p6mr3567251wab.178.1209776675536; Fri, 02 May 2008 18:04:35 -0700 (PDT) Received: by 10.114.209.15 with HTTP; Fri, 2 May 2008 18:04:35 -0700 (PDT) Message-ID: <10845a340805021804h1e7faaeei80e41252cbe341b5@mail.gmail.com> Date: Sat, 3 May 2008 02:04:35 +0100 Reply-To: RQuadling@GoogleMail.com To: "Stanislav Malyshev" Cc: internals@lists.php.net In-Reply-To: <481BB646.4060407@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <001401c8ac74$dda6d060$98f47120$@com> <1209749793.1075.54.camel@inspiron.local> <481B5F45.4030106@gmail.com> <481B6068.9060402@lerdorf.com> <1209758625.1075.87.camel@inspiron.local> <20080502232537.GB6064@mint.phcomp.co.uk> <10845a340805021659p34b5b403r9c2f00b96eb83803@mail.gmail.com> <481BAC65.9030407@zend.com> <10845a340805021714h45c316a7qc99c05e9e52ae5e4@mail.gmail.com> <481BB646.4060407@zend.com> Subject: Re: [PHP-DEV] Float comparison From: rquadling@googlemail.com ("Richard Quadling") 2008/5/3 Stanislav Malyshev : > Hi! > > > > > Solvable in userland easily enough, but having a native money type, > > especially when dealing with inter-currency conversions, then accuracy > > is paramount. > > > > Adding native primitive type is expensive - there's a lot of places in > engine and various functions that have to deal with primitive types, and > they all need to be updated. However, adding object type can be OK, provided > you are ready to forgo $a+$b for $a->add($b) etc. One might start with class > library in PHP and go for extension later. I'm sure there are some code > around doing this already :) > -- > > Stanislav Malyshev, Zend Software Architect > stas@zend.com http://www.zend.com/ > (408)253-8829 MSN: stas@zend.com > Is it not possible to overload operators? Though this would probably even more work to do. -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"