Re: Multiple "pointers" to "objects"

2003-07-14 Thread Graham Klyne
I think you need an approach that: (a) simply doesn't let you construct data with conflicts -- such constraints would be enforced by the data type constructors and "update" functions, and (b) deal with "update" by creating a new structure that is a modified version of some existing structure.

Re: Multiple "pointers" to "objects"

2003-07-12 Thread Nick Name
On Sat, 12 Jul 2003 07:47:02 -0700 (PDT) Ron de Bruijn <[EMAIL PROTECTED]> wrote: > > It's ofcourse possible to put a list of Subjects that > a Teacher teaches in the data declaration of the > teacher. But then there is no way of saying > efficiently (O(1) Just a pointer or index):"Give me a

Multiple "pointers" to "objects"

2003-07-12 Thread Ron de Bruijn
Hi there, I was almost certain that Haskell was a great language until I wanted to make a real usefull program and got the following problem. I have data Lesson = Lesson Teacher SomeOtherProperties deriving Show data Subject = Subject Name [Teacher] SomeOtherProperties deriving Show d