POV-Ray : Newsgroups : povray.off-topic : GIMP hotkeys/ scripts/ user-defined functions? : Undirected rambling Server Time
6 Sep 2024 23:20:49 EDT (-0400)
  Undirected rambling  
From: Invisible
Date: 10 Dec 2008 11:37:34
Message: <493ff04e@news.povray.org>
>> What, defining three pages of code is longer than the 1-liner I posted?
>>
>> The ($) operator is defined in the Haskell language standard. :-P
> 
> The o operator is defined in my personal standard and I never look back. ;)

OK, but ($) is still a 1-liner:

   f $ x = f x

And, unlike your notation, it doesn't require any brackets at all! ;-)



BTW, what would you say the most irritating library design flaw in 
Scheme is? In Haskell, my personal one is this:

   filter odd [1, 2, 3, 4]

That takes a list and filters out the odd numbers, right?

WRONG!

It filters out the *even* numbers.

Like, WTF?

Obviously what they *should* have done is name it "select". Then you 
would write

   select odd [1, 2, 3, 4]

and it would be completely obvious what it does. Hey, it works for SQL 
and Smalltalk, why not Haskell? *sigh* I keep thinking that

   filter f = select (not . f)


Post a reply to this message

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