[erlang-questions] per function/process locals

Ulf Wiger ulf@REDACTED
Mon May 7 08:16:12 CEST 2007


2007/5/7, Vance Shipley <vances@REDACTED>:
>
> On Wed, May 02, 2007 at 01:21:41PM +0200, Ulf Wiger (TN/EAB) wrote:
> }
> }  As it's not a great idea to export records in an API,
> }  I often prefer to take a property list as input.
>
> Ulf,
>
> Can you elaborate on why using a record in an API is a bad thing?
>
>         -Vance


Records depend on the preprocessor, and therefore introduce a
compile-time dependency between modules. When using e.g.
property lists, which are admittedly slower than records, adding
a new property is easy. If you use a record, the users of the API
must recompile in order to be compatible, even if they don't
use the new option.

BR,
Ulf W
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070507/5de319ed/attachment.htm>


More information about the erlang-questions mailing list