[erlang-questions] -spec tuple variable size
Thu Nov 29 18:25:06 CET 2012
I'll continue with a -spec entity() :: tuple() and handle type validation at run-time
On Nov 29, 2012, at 6:58 PM, Motiejus Jakštys <> wrote:
> On Thu, Nov 29, 2012 at 4:46 PM, Dmitry Kolesnikov
> <> wrote:
>> I do offer an api to store a tuple. The storage do not concern the tuple cardinality, in similar fashion like ets/dets does. One of my current limitation is that tuple elements MUST be a particular data type. I simply want to validate that client writes tuples with supported data types. I am also fine with generic tuple() data type but it is less error prone.
> If you really need that, you could write a parse_transform, which
> would create 4096 reincarnations of correct tuples. However, I
> think it will still be reduced to tuple() by dialyzer during
> checking time (please correct me if not).
> : http://erlang.org/pipermail/erlang-questions/2012-August/068855.html
> Unfortunately, patch for dialyzer to replace SET_LIMIT to a run-time
> argument, in this case 4096, still did not reach the top of my todo
> Motiejus Jakštys
More information about the erlang-questions