erlang - Are tuple modules an officially documented feature of the language? -
edit: steve vinoski kindly provided in comments official name : tuple modules.
my original question remains though: tuple modules officially documented otp team? , expected remain supported in future?
original question:
consider following erlang module:
-module(foo). -compile(export_all). new(bar) -> {foo, bar}. get({foo, bar}) -> bar. i quite amazed see allows following (using erlang 19.1):
2> foo = foo:new(bar). {foo,bar} 3> foo:get(). bar which differs quite usual way of calling module's function.
as far can tell, seems remnant of parametrized modules, have been deprecated since r16; , can't find in official documentation stating supported, stable feature of language.
my question is: documented feature of language? , if yes, where?
as far know undocumented remnant of parameterized modules , exists prevent legacy code breaking. imagine intended chiefly prevent mochiweb breaking, can't think of other serious libraries make use of parameterized modules.
i can't locate documentation on , doesn't seem subject of current consideration. there announcement cannot locate (but found references to, not links) claimed documented, quite while ago.
the release readme r16b parameterized modules removed mentions this:
otp-10616
the experimental feature "parameterized modules" (also called "abstract modules") has been removed. applications depends on parameterized modules, there parse transform can used still use parameterized modules.
the parse transform can found at: github.com/erlang/pmod_transform
that issue number not appear in otp's issue tracker anymore, , can't find occurrence of "parameterized module" or "tuple module" anywhere in otp's jira instance. i'm assuming undocumented legacy crutch , nothing more.
Comments
Post a Comment