[erlang-questions] Difference between erlang:send_after and timer:send_after?

Fredrik Andersson sedrik@REDACTED
Wed Jun 30 08:45:51 CEST 2010


On Wed, Jun 30, 2010 at 8:39 AM, Attila Rajmund Nohl
<attila.r.nohl@REDACTED> wrote:
> 2010/6/30, Bernard Duggan <bernie@REDACTED>:
>> On 29/06/10 18:17, Fredrik Andersson wrote:
>>> These two functions seems to be doing the exact same thing (sending a
>>> message after a certain amount of time) but I was wondering why they
>>> are both there. Should timer:send_after not be replacing
>>> erlang:send_after or am I missing something here?
>> Yep - you're missing the bit in the efficiency guide that explains the
>> difference :)
>> http://www.erlang.org/doc/efficiency_guide/commoncaveats.html#id2262042
>>
>> If anything, the timer: version should be removed but no doubt that
>> would break people's code :)
>
> The usual procedure is to give a "deprecated" warning for a release
> and two, then remove it... On the other hand code used to compile
> under R13B doesn't compile under R14A, so breakage already happens.

Yeah but why has this not happend yet? I have talked some with Ulf
Wiger now and understand why they both exist but not why
timer:send_after has not been deprecated yet. Currently I see no
reason to use timer:send_after. What are your opinions on this matter?
Currently it seems to cause more confusion than useage.

>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
>


More information about the erlang-questions mailing list