Re: Collections module for ESL
- Posted by D. Newhall <derek_newhall at yahoo.com> Jul 25, 2005
- 443 views
Juergen Luethje wrote: > snip > > I expect that we'll have a few advanced data type modules for the > > standard variety of structures that most programmers use. > > > > So how about: > > queue.e > > stack.e > > hash.e > > set.e > > record.e Another snip > > So what shall I add to the papers? For now you should say that files with those names have been proposed and each is used for implementing the structure that's in its name. Question for everyone: Should we implement the structures using types or hidden sequences and have them referenced by ids? Both have their downsides. I vote for the "hidden sequence" style with ids. Example: -- type example stack s object x -- pop() would have to return the stack and the object s = push(s, x) x = pop(s) s = x[1] x = x[2] -- "hidden sequence" example integer stack_id object x -- "hidden sequence" style would need to initialize the stack first stack_id = create_stack() push(stack_id, x) x = pop(stack_id, x)