[erlang-questions] Beginner: What's wrong with this code?

Banibrata Dutta banibrata.dutta@REDACTED
Thu Jun 23 06:12:41 CEST 2011


On Thu, Jun 23, 2011 at 4:55 AM, Sid Carter <sidcarter@REDACTED> wrote:

> On 23 June 2011 00:32, Kostis Sagonas <kostis@REDACTED> wrote:
> >
> > Others have already explained the problem and suggested a fix for it. But
> > these kinds of errors (forgetting one set of list brackets) are very
> common.
> > They can easily be avoided if one writes in more modern Erlang rather
> than
> > in Erlang of 10 years ago. In this particular case, you can use a spawn
> with
> > a fun that makes the call to function format_temps/1 clear:
>
> And while searching, I found this ->
> http://www.erlang-factory.com/upload/presentations/347/Kostis.pdf
>
> I suppose that's a good start on modern Erlang. Are there more? :)
>
> Great find. Also, wondering if there is a more generic 'Style Guide' (a.lathe PEP for Coding conventions, forgot the number).

BTW, the modern erlang code (slide#23), looks bit more "intimidating and
crowded" compared to the extremely simple look that old Erlang code has.
One of the merits of Erlang code, cited in some language comparisons was
based on the LoC comparison, somehow the modern Erlang code seems to add a
lot of volume. Although some refactoring done by TidiEr do seem to reduce
LoC as well. Anyhow, I'm certainly bookmarking and exploring all suggestions
in that presentation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110623/a71c26cf/attachment.htm>


More information about the erlang-questions mailing list