[erlang-questions] OTP-9649 and further changes

Jon Watte <>
Wed Jan 18 18:40:47 CET 2012


I have a separate question about this.

{M, F} references survive code reload and old code purge. That is, you can
hold on to these references "forever."
fun() -> M:F() end does not -- once the code that defined the fun is
purged, any reference will now generate an exception when called.

Will "fun M:F/A" survive reloads and old code purge, and behave like the
tuple function?

Sincerely,

jw


--
Americans might object: there is no way we would sacrifice our living
standards for the benefit of people in the rest of the world. Nevertheless,
whether we get there willingly or not, we shall soon have lower consumption
rates, because our present rates are unsustainable.



On Tue, Jan 10, 2012 at 8:19 AM, Yurii Rashkovskii <> wrote:

> Hi,
>
> I was wondering if anybody (especially from the OTP team) can shed
> some light on the following subject.
>
> In R15 we've got this:
>
> OTP-9649  Tuple funs (a two-element tuple with a module name and a
>              function) are now officially deprecated and will be removed
>              in R16. Use 'fun M:F/A' instead. To make you aware that your
>              system uses tuple funs, the very first time a tuple fun is
>              applied, a warning will be sent to the error logger.
>
> Which is fine.
>
> But I was wondering if there's any word out about the fate of tuple
> modules? The ones like {erlang}:element(1). Are they expected to be
> kept around? (I certainly hope they are :)
>
> Thanks,
> Yurii.
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120118/ca70e6ea/attachment.html>


More information about the erlang-questions mailing list