POV-Ray : Newsgroups : povray.off-topic : I'm in the mood for monads : Re: I'm in the mood for monads Server Time
29 Jul 2024 16:26:26 EDT (-0400)
  Re: I'm in the mood for monads  
From: Darren New
Date: 22 Apr 2012 23:45:15
Message: <4f94d04b$1@news.povray.org>
On 4/22/2012 9:51, Warp wrote:
> but the values to which they are fixed is determined at runtime rather
> than at compile time.)

You'd wind up having something closer to "objects" with an "invoke" method 
(or functors, if I recall the C++ term).  It's just that Haskell makes that 
automatic, in the same way the new C++ makes class definitions automatic 
when you type a lambda expression. Given enough convenience, you get a 
qualitative difference.

>    There are probably even deeper implications.

In all honesty, currying was created for computer science, not for computer 
programming. It was invented so you could prove things about a one-argument 
function that returns one value and apply those proofs to functions that 
take multiple arguments and return multiple values. I.e., it was invented 
for the same reason it was useful to invent UTMs, or to prove that any 
2-tape TM can be emulated by a one-tape TM.

-- 
Darren New, San Diego CA, USA (PST)
   "Oh no! We're out of code juice!"
   "Don't panic. There's beans and filters
    in the cabinet."


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.