[erlang-questions] Learning Erlang from the Armstrong book
Lev Walkin
vlm@REDACTED
Wed Nov 5 06:58:25 CET 2008
Tony Cappellini wrote:
> Learning a new language is always a pain.
>
> Having a "popular book" being recommended as "the place to start
> from", then struggling trying to figure out why the code in the
> "recommended book" doesn't work is even more frustrating.
> Almost 50 pages into the book the author has a panel which reads" Some
> readers have mistakenly typed into the shell fragements ocf code
> contained in the source code listings. These are not valid shell
> commands and you will get some strange error message if you try to do
> this".
>
> Why is this not in the front of the book? ;-)
>
> So how is a newbie supposed to know which code in the "recommended"
> book is valid?
The book has many pages. If one start from some random page, there's
always a chance of missing some of the important statements earlier
in the book. If one reads through the book right from the beginning,
there's certainly less chance to overlook something fundamental.
That said, let's check the facts. The following notice appears
precisely at the 27'th page, the very _next_ page after the very
_first_ example involving the shell (page 28):
Warning: You can’t type everything you read in this book into
the shell. In particular, you can’t type the code that’s listed
in the Erlang program files into the shell. The syntactic for ms
in an .erl file are not expressions and are not understood by the
shell. The shell can evaluate only Erlang expressions and
doesn’t understand anything else. In particular, you can’t type
module annotations into the shell; these are things that start
with a hyphen (such as -module, -export, and so on).
--
Lev Walkin
vlm@REDACTED
More information about the erlang-questions
mailing list