This is a public service announcement.

How many times have you written Erlang code like this:

Label = atom_to_list(node()) ++ "_" ++ integer_to_list(N) ++ "_" ++ Suffix.

Now is the time to stop writing such code.1 There is a neat function in the lists module (see edoc) that does the job for you. Alas, it is way too easy to overlook this humble function. This is a pity, because using it results in much cleaner code:

Label = lists:concat([node(), "_", N, "_", Suffix]).

As you can see, it converts atoms and integers (and even floats, even though that might not always be the greatest idea) implicitly to string format, and concatenates everything together into one character list.


1 You might actually want to do some grepping around and retroactively clean up your existing code. Especially if you think you have another 10 years in this business.