[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inconsistencies
From: |
Rob Browning |
Subject: |
Re: Inconsistencies |
Date: |
21 Mar 2001 23:54:10 -0600 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
Gary Benson <address@hidden> writes:
> This is often the hardest thing to discover when learning a new
> language. The books and tutorials tell you how to write programs but
> only looking at other people's code do you discover how _people_
> write programs.
One other scheme book that you may already have seen, and I highly
recommend is "The Structure and Interpretation of Computer Programs"
(commonly referred to as SICP). It's a textbook style book, so that
might or might not suit your tastes, but it's deeply informative.
WRT to scheme conventions, some off the top of my head:
- as mentioned lowercase is generally the rule
- dashes are used as word separators in symbols: foo-bar not foo_bar.
(both of these rules follow the laziness principle if nothing else,
they're easier to type, and no, I haven't gotten around to remapping
my keyboard to put the parens where the brackets are :>)
also note from r5rs:
Naming conventions
------------------
By convention, the names of procedures that always return a boolean
value usually end in "`?'". Such procedures are called predicates.
By convention, the names of procedures that store values into
previously allocated locations (see section *note Storage model::)
usually end in "`!'". Such procedures are called mutation
procedures. By convention, the value returned by a mutation
procedure is unspecified.
By convention, "`->'" appears within the names of procedures that
take an object of one type and return an analogous object of another
type. For example, `list->vector' takes a list and returns a vector
whose elements are the same as those of the list.
Hope this helps.
--
Rob Browning <address@hidden> PGP=E80E0D04F521A094 532B97F5D64E3930