POV-Ray : Newsgroups : povray.off-topic : More random humous : Re: More random humous Server Time
7 Sep 2024 03:21:11 EDT (-0400)
  Re: More random humous  
From: Warp
Date: 6 Oct 2008 19:09:52
Message: <48ea9ac0@news.povray.org>
Orchid XP v8 <voi### [at] devnull> wrote:
> >   You mean there aren't mutable arrays in Haskell?

> You're fascinated by mutable arrays, aren't you? :-)

  I suppose I just can't get over the mentality that arrays are the
fastest possible data containers for random access, that random access
is required for very many algorithms, that many algorithms require
modifying the data in the array, and that an array is one of the most
memory-efficient ways of storing data in memory (in certain circumstances
there are even more space-efficient ways, but those are a bit exceptional
cases).

  Many programming languages seem to detest arrays because they are not
very dynamic (it's very hard to increase the size of an array in an
efficient way, and alternative O(1) random access containers which are
easy to resize have an annoying minimum overhead, which is bad for very
small arrays). Of course their mutability (immutable arrays are not very
useful, after all) also makes certain things difficult in a language which
tries to ensure certain things about safety and correctness.

  I'm curious: Were mutable arrays a later addition to the Haskell language?
Did it start as a pure functional language, but mutable arrays were added
later because pure functionality is *not* the silver bullet?-)

-- 
                                                          - Warp


Post a reply to this message

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