[erlang-questions] How to send a message to all nodes without UDP broadcast?

Ulf Wiger ulf.wiger@REDACTED
Thu Mar 18 08:37:43 CET 2010


On Thu, 18 Mar 2010 01:29:33 +0100, Martin Logan <martinjlogan@REDACTED>  
wrote:

> You probably want to go with a foreach instead of a comprehension.
> There is no need to collect and then discard the results of each use
> of ! :)

Yes... there was a discussion about this some time ago on the
list. I can't be bothered to dig it up, but remember partly because
I argued for LCs to not build the result unless it was needed.

In a very recent post, Bernard Duggan pointed to a section in the
Efficiency Guide:

http://www.erlang.org/doc/efficiency_guide/listHandling.html#id2261027

"In R12B [and presumably later], if the result of the list comprehension
will *obviously* not be used, a list will not be constructed."

...so there is hope still, for those who prefer the LC style over
foreach. :)

BR,
Ulf W
-- 
Ulf Wiger
CTO, Erlang Solutions Ltd, formerly Erlang Training & Consulting Ltd
http://www.erlang-solutions.com
---------------------------------------------------

---------------------------------------------------

WE'VE CHANGED NAMES!

Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD.

www.erlang-solutions.com



More information about the erlang-questions mailing list