[erlang-questions] Where is an ets guide?

Jeff Crane jefcrane@REDACTED
Fri Sep 22 00:48:49 CEST 2006


I would like to find an ets usage guide?


I had to type in "ets:new erlang" to Google just to
come up with a half tutorial that just raises more
questions.

http://schemecookbook.org/Erlang/HashChapter
---
dict provides a simple dictionary implementation, in
which values (of any Erlang type) can be stored and
accessed by keys (Erlang terms). ets has a similar
interface, but is designed for dealing with vast
quantities of 
data.
---
What does that mean? They are the same, but not, and
one is designed for dealing with lots of data, and
dict is for something else entirely, like making
toast?

http://web.mit.edu/erlang_vR10B-10/arch/sun4x_510/lib/erlang/lib/stdlib-1.13.12/doc/html/ets.html

look around and HOPE new/2 is the correct choice to
start...

ets:new(Name,Options) -> tid()

so I type

ets:new(mytable,[]).
16 % that's a tid!

ets:insert(mytable,{1,"first"}).
% Nope...wtf?

MyTable2 = ets:new(mytable2,[]).
19 % that's a tid!

ets:insert(MyTable2,{2,"second"}).
% true? Um, I'm lost.

What's the point of the name atom?

Better yet, where's a halfway decent guide to ETS?

__________________________________________________
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