POV-Ray : Newsgroups : povray.off-topic : Games programmers : Re: Games programmers Server Time
10 Oct 2024 19:23:12 EDT (-0400)
  Re: Games programmers  
From: Invisible
Date: 12 Sep 2008 09:22:24
Message: <48ca6d10@news.povray.org>
>> I wouldn't exactly call that straightfoward either. It's not *actually* 
>> complicated, but it sure *looks* pretty baffling.
> 
>   But the haskell code is normal, regular haskell. Your C example is
> not code any sane person would write.

Mmm, and you think any sane Haskell programmer would implement the 
Fibonaci numbers that way in a real program? It's an interesting 
teaching example, but seriously, if you *want* Fibonacci numbers for 
some reason, there is a simple, well-known O(1) algorithm for that.

>> Alternatively,
> 
>>    while(*v++ = *s++);
> 
>> I mean, what THE HELL...?
> 
>   At least it's easy to understand what it does (and why it works) when
> it's explained. The haskell example isn't.

Really? I mean, it's a little perplexing that the computer is actually 
able to unravel it without getting stuck, but once you understand what 
the machine is doing internally, it's not so hard.

-- 
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.