Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] recomendations for a functional language



On 2009-11-04 02:44 +0900 (Wed), Stephen J. Turnbull wrote:

> Curt Sampson writes:
>  > On 2009-11-03 04:33 +0900 (Tue), Stephen J. Turnbull wrote:
>  > 
>  > > Again, CL is a Lisp-2 while Scheme is Lisp-1.
>  > Sorry, I got the two backwards there.
> OK, just checking that *I* didn't get them backwards. :)

Oh, now you've got me worried. But I just checked as well, and you're
correct here.

I just need to remember that the "1" vs. "2" refers to the number of
namespaces, not which Lisp came first and which came second.

> My point is that shopping cart calculations are add, add, add, add,
> then multiply.

Actually, there are several multiplies at varoius stages, depending on
the various discounts and so on being applied.

But in the end, you're never going to be out by more than a penny,
that's going to be exceedingly rare in typical application, and whether
you're even out or not is a matter of the business rules you're using as
much as the behaviour of IEEE floating point systems.

> This just isn't hard to get right in a business sense.  Is it?  Am I
> missing something?

Yes, you're missing that some PHP developers were told, back near the
beginning of their careers, "NEVER, EVER USE FLOATING POINT FOR MONEY"
and that's now the word of God to them.

cjs
-- 
Curt Sampson       <cjs@example.com>        +81 90 7737 2974
           Functional programming in all senses of the word:
                   http://www.starling-software.com


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links