POV-Ray : Newsgroups : povray.off-topic : Haskell raving : Re: Haskell raving Server Time
11 Oct 2024 15:20:10 EDT (-0400)
  Re: Haskell raving  
From: nemesis
Date: 4 Nov 2007 15:50:00
Message: <web.472e2ff17b4224e7e28b7b80@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> In C, you declare a pointer to a structure without defining the layout
> of the structure. C allows this, because it assumes all pointers are the
> same size and have a unified alignment requirement and can all live in
> the same kinds of registers and things like that.
>
> Then in your code file, you define the structure. Creating an object
> involves allocating the structure and returning the opaque pointer to
> it. Using the object requires passing the opaque pointer back in.
>
> No implementation details are visible at all.

good ol' abstract data types.  I still enjoy Haskell's powerful algebraic
datatypes, higher-order functions, currying and concise coding a lot more.


Post a reply to this message

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