[erlang-questions] clarify: Sending big messages
Johnny Billquist
bqt@REDACTED
Wed Oct 22 16:22:00 CEST 2008
Kostis Sagonas wrote:
> Zoltan Peter Toth wrote:
>> Hi,
>>
>> We have a function like this:
>>
>> deliver(Port, Data) ->
>> Port ! {data, Data}.
>>
>> This function returns Data.
>
> Nope. This function returns {data, Data}.
>
> I personally think that !/2 returning a value instead of being void as
> it should, is a design flow in the definition of the language. (*)
???
Erlang is a functional language. Everything returns something. There is
no "void".
Maybe it should always return "ok" instead, but I think it's better it
returns the expression sent, in case you do want to play around with it
somehow.
Johnny
More information about the erlang-questions
mailing list