[erlang-questions] Where is an ets guide?
Jeff Crane
jefcrane@REDACTED
Fri Sep 22 19:12:15 CEST 2006
> > ets:new(mytable,[]).
> > 16 % that's a tid!
>
> Identifiers are supposed to be opaque.. just like
> the internal
> representation of dict, etc.
I dont know anything about dict. that doesnt help me
understand what mytable is for.
> > ets:insert(mytable,{1,"first"}).
> > % Nope...wtf?
>
> mytable isn't the Tid, and you didn't ask for a
> named table.
What are you talking about? I made a table with a name
atom of mytable, what is that other than the table
name?
> > MyTable2 = ets:new(mytable2,[]).
> > 19 % that's a tid!
> >
> > ets:insert(MyTable2,{2,"second"}).
> > % true? Um, I'm lost.
>
> How lost could you be?
> > What's the point of the name atom?
What's the point of the name atom?
You didn't answer the question, of course I'm lost.
Why is MyTable2 the table reference, when mytable2
should be the correct reference? What's the point of
mytable2 if it's not the named reference? Sheesh.
> It helps to read *all* of the docs for a function.
> There's a
> named_table option, which lets you specify the Tid
> as an atom:
>
> * named_table If this option is present, the name
> Name is associated
> with the table identifier. The name can then be used
> instead of the
> table identifier in subsequent operations.
> The docs are pretty sufficient, if you read them.
>
> -bob
I have read them. They aren't sufficient, when you're
not already vetted in erlang. It's too bad you are
unable to see it.
Again, someone needs to present a decent ets guide.
__________________________________________________
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