Re: Name for converter of units/currency
| From: | jmh3 at linuxfreak dot com | Date: | Sun, 07 Jan 2001 01:39:26 +0000 |
| Subject: | Re: Name for converter of units/currency | ||
| References: | 1 | Groups: | php.pear |
| Request: | Send a blank email to php-pear+get-827@lists.php.net to get a copy of this message | ||
On Sat, 6 Jan 2001, Jon Parise wrote:
> On Sat, Jan 06, 2001 at 07:00:49PM +0300, Mikhail Zabaluev wrote:
>
> > I'm writing a PEAR-style class for converting measure and currency units
> > and troubled with its name. How would it be called in the PEAR hierarchy?
> > I'm declining for 'Units_Conv'. What would you people suggest?
>
> I think it would be more appropriately placed in the 'Numbers'
> hierarchy, perhaps using separate classes for measurement and
> currency conversions.
really though. currency is just another type of measurement. i know
breaking it up like this seems logical in the sense that monitarywealty !=
length for instance, but taking it farther mass != length each is it's
own. if you are going to create a separate class for currency you should
do it for each type of measure. the thin you are going to run into is when
using compound units. say you have something that is 40$/ft you are going
to have to break it up into $ then ft and convert the separately.
just a thought.
john
:wq
>
> --
> Jon Parise (jon@csh.rit.edu) . Rochester Inst. of Technology
> http://www.csh.rit.edu/~jon/ : Computer Science House Member
>
> --
> PHP Extension and Add-on Repository (PEAR) mailing list.
> Documentation can be found at http://pear.php.net/doc/pear.html
> To unsubscribe, e-mail: php-pear-unsubscribe@lists.php.net from the
> mail address you subscribed with.
>