[erlang-questions] -spec tuple variable size

Dmitry Kolesnikov dmkolesnikov@REDACTED
Fri Nov 30 23:03:41 CET 2012


On Nov 30, 2012, at 2:26 AM, "Richard O'Keefe" <ok@REDACTED> wrote:

> Let me put it this way:
>   why do YOU care whether all the elements of the tuple have
>   the same type?

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. E.g. I do not have a support for nested tuples yet.

> Since the client's calls to your code might not be type checked,
> you cannot rely on type checking to guarantee whatever property
> it is you need, so you are going to need a run-time check anyway,
> aren't you?

Yes, run-time check exists.

- Dmitry

More information about the erlang-questions mailing list