[erlang-questions] origin of handle_info/2

Richard Carlsson carlsson.richard@REDACTED
Fri Mar 17 10:58:18 CET 2017

No, I think it's more to do with the fact that the original authors were
not native English speakers, and thought "info" was a good enough shorthand
for "any other stuff that someone sends us".


2017-03-16 23:57 GMT+01:00 Xavier Noria <fxn@REDACTED>:

> On Thu, 16 Mar 2017 at 23:11, Richard Carlsson <carlsson.richard@REDACTED>
> wrote:
> It's "info" in the sense of "any other messages to this process, that are
>> not recognised as special OTP framework messages". When you use a function
>> like gen_server:call(...), the OTP libraries wrap your message in a way
>> that lets the receiving server process see that it is a part of the OTP
>> framework and redirects it to the standard callbacks like handle_call() or
>> handle_cast(). If you just send a message to the gen_server process with
>> the ! operator, it will not have the right wrapper, and will be dispatched
>> to handle_info(). Typical uses of info messages are timeouts and other
>> "note to self" style messages.
> Yes, that is the way it works, but "info" doesn't convey that meaning to
> me. Does it to you?
> I wondered if maybe historically it had a smaller contract where "info"
> was a natural choice and with time the contract was relaxed up to accepting
> anything but calls and casts.
>> --
> Sent from Gmail Mobile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170317/cc5a3ed7/attachment.htm>

More information about the erlang-questions mailing list