Re: Float comparison
| From: | Richard Quadling | Date: | Sat, 03 May 2008 01:04:35 +0000 |
| Subject: | Re: Float comparison | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37419@lists.php.net to get a copy of this message | ||
2008/5/3 Stanislav Malyshev <stas@zend.com>:
> 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!"