Implementing tables - advice wanted

Joe Armstrong (AL/EAB) <>
Tue Jun 13 13:29:05 CEST 2006


 

> -----Original Message-----
> From:  
> [mailto:] On Behalf Of 
> Thomas Lindgren
> Sent: den 13 juni 2006 11:54
> To: 
> Subject: Re: Implementing tables - advice wanted
> 
> 
> 
> --- "Joe Armstrong (AL/EAB)"
> <> wrote:
> 
> >  
> > Hello,
> > 
> >    I've been thinking a bit about tables in Erlang.
> 
> Question: are these tables pure or impure? Since you are 
> using ets in your examples, I would guess impure.
> If so, is this a wise choice? (I personally wouldn't 
> recommend it, unless it's a conscious decision to introduce 
> mutable data inside Erlang processes.)

No pure - perhaps the ets example was misleading,
I was really more interested in knowing if the ets C code
was reusable.

> 
> I would instead recommend starting out by translating the 
> notation into using dict or, even better, a well-defined 
> behaviour. Then plug in more efficient implementations as needed.

I did that a long time ago - it's the more efficient implementation I'm
interested in. 

> Most operations should be straightforward to translate. The 
> main exception I can think of is pattern matching.

A naive translation is easy - doing the PJ style optimisations
is needs some thought.

> 
> (I think it sounds like a useful thing to have, by the
> way.)
> 
> Best,
> Thomas
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection 
> around http://mail.yahoo.com 
> 



More information about the erlang-questions mailing list