[erlang-questions] comments on erlang course

Bill McKeeman <>
Thu Aug 28 04:22:44 CEST 2008


Suggestion for http://www.erlang.org/course/course.html

I am a newbie, so I am seeing this tutorial fresh for the last time.
Here are my comments, most of which are suggestions for improvement.
I am guessing the owner of the html above will see this 'question'.

/s/ Bill McKeeman

Sequential Programming

  Integers   Note
    . extended precision (perhaps as an example).
  Atoms   Note
    . some atoms are reserved.
  Variables can start with _.  Should mention "don't care" _.
  Complex Data Structures   hyphenation typos (3)
  Module System    There is no double/2: misleading example
  Function Syntax    Instead of ..., use body1; body2; ...
  Function Syntax   Note
    .  The last expression in the body is the function value
  Examples of Guards  Armstrong recommends =:=
  Shell Commands  Use X or Var, not both for f(X).

  By the way, if U is a process id, does f(U) create an orphan?

 Concurrent Programming

  Simple Message Passing
    B ! foo.   receive
                 foo->
                   actions
               end.
    is a simpler example.  self() does not need to be in both.

  Client Server Model    Note
    . The client will wait for the reply.

  Use of Timeouts   typo iin, typo miliseconds

Error Handling
  Exit Signals propogate through Links    typo eventuall
  Robust Systems can be made by Layering    typo ocuring  typo deper

Advanced Topics
  Throughout--- use of ` when ' is intended.  Hard to read.
  Port Protocols    Typo  he instead of The
  Last Call Optimization.    I do not see why the tail recursion
    server(Data1) cannot be placed after the end of receive.
    There are other errors also.  I recommend

-module(foo).
-export([server/1]).

server(Data) ->
 receive
   {From, Info} ->
      Data1 = process_info(From, Info, Data);
   {From, Ref, Query} ->
      {Reply, Data1} = process_query(From, Query, Data),
      From ! {Ref, Reply}
  end,
  server(Data1).
process_info(_,_,_) -> 1.
process_query(_,_,_) -> {2,3}.

Process Dictionary    typo diction instead of dictionary
  typo referencial instead of referential

Obtaining System Information    typo dic tionary


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080827/6957847c/attachment.html>


More information about the erlang-questions mailing list