Ets/dets iterators & match specs in R8

Bjorn Gustavsson <>
Mon Oct 30 12:01:01 CET 2000

For the R8 release, we have PRELIMINARY plans to improve the
ets/dets iterators and to add compiler/parse transform support
to generate match specs automatically for the ets:select/2 function.

Here are some of the extensions we are thinking of. We might do
some of these, or all of them, or something entirely different
if we (or someone else) come up with better ideas.

1) Allow list comprenhensions to be used on ets, dets and mnesia
   tables using the syntax proposed by Robert Virding.
   The compiler can then convert an entire list comprenhension
   to a call to ets:select/2, provided that all expressions in
   the comprehension can be expressed as a match spec.

2) Let the compiler transform the new [d]ets:fold[rl]/3 iterators
   to an ets:select/2, if possible. The fun must obviously be
   given inline for this to be possible, and it must only contain
   calls to guards bifs and operators and so on.

3) Introduce special syntax, for instance "match_spec (Arg...) -> ... end",
   to allow an match spec to be expressed in an erlang-like syntax.
   The match spec can be assigned to a variable, and then used in both
   tracing and ets:select/2.

Björn Gustavsson            Ericsson Utvecklings AB
			    BOX 1505
+46 8 727 56 87 	    125 25 Älvsjö

More information about the erlang-questions mailing list