POV-Ray : Newsgroups : povray.off-topic : GIMP hotkeys/ scripts/ user-defined functions? : Re: Undirected rambling Server Time
7 Sep 2024 01:19:54 EDT (-0400)
  Re: Undirected rambling  
From: Orchid XP v8
Date: 10 Dec 2008 13:45:51
Message: <49400e5f$1@news.povray.org>
> Why would my o operator not be a one-liner?

Because it's defined as four (very wide) lines? :-P

> I don't have a problem with brackets or parenthesis.  Besides, Haskell 
> needs it too to solve ambiguities in all but the most simpler expressions.

Yeah, I know. This argument is getting kinda silly. ;-)

> And multiple $ for each call is as bad as multiple parenthesis, I guess.

Not really. With brackets, you have to match opening and closing 
characters. With ($), there is only one thing to "match". The trouble 
comes if you try to mix it with brackets as well... Basically, if you 
find yourself doing this, you should probably split your expression into 
smaller parts. Same as any language, really... except Lisp. In Lisp, you 
cannot avoid endless brackets, because notionally the *entire source 
code* as a single expression. :-P

>> BTW, what would you say the most irritating library design flaw in 
>> Scheme is?
> 
> None.  It's perfect. ;)

Heh, right. One question: is it statically-typed?

> Ok, to be fair, I didn't like the latest standard very much... And given 
> Scheme is very minimalist, I'm used to writing my own libs, so any 
> design flaws are really mine. ;)

Yeah, I prefer a language with as few things as possible "baked-in".

Sadly, Haskell's list syntax is one such thing. :-(

> Hmm, that's just different terminology for the same things.

Ah, but *never* underestimate how important terminology can be! ;-)

> I believe, though, that 2 functions doing 
> pretty much the same thing is wrong and bad design.

Haskell is *loaded* with functions that do the same or similar things. 
It's about how you want to think about your problem.

For example, there's a variable defined that's called "otherwise". It's 
value is "True". But compare these:

   foo x
     | x <  0 = ...
     | x == 0 = ...
     | True   = ...

   foo x
     | x <  0    = ...
     | x == 0    = ...
     | otherwise = ...

Which do you think is clearer? ;-)

> select is really only used in SQL.

And Smalltalk.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

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