It's possible to write code that is interpreted *identically*
on both wisp and sweet when indentation is enabled.  In sweet, a "." at the
beginning of a line post-indent is basically ignored.  This was for consistency
with neoteric-expressions, and left there in part to be consistent with sweet.
In wisp, a leading "." is NECESSARY to disable automatic list-wrapping.
So if you begin any line with "." if it has a single element, and avoid the
additional markers like ":", "$", "\\", and <*...*>, they're identical.

Thus, in both sweet and wisp:
a b c
  d e
  . f
  g h
(a b c
  (d e)
  (g h))

Of course, once you open a list (...) and format it normally,
or start a curly-infix-expression {...}, they are identical.

If wisp interpreted neoteric-expressions by default,
then many more expressions work in both systems, e.g.:
defun factorial()
  if {n <= 1}
  . 1
  {n * factorial{n - 1}}

In general I find that if the first element is a symbol, I normally
write it using f(...), e.g., cos().  That is ALWAYS true if it's
a procedure I'm calling.  However, if the first element is not a symbol,
e.g., a number, then I write a normal list, e.g., '(1 2 3).
The pretty-printer exploits this; if something is a symbol, and the list
is not too long (e.g., 16 items or so), it's presented in f(...) format.
So while neoteric-expressions provide two ways to write something,
in practice, there's a "more readable" way that better expresses the purpose
in each case.

--- David A. Wheeler

Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
Readable-discuss mailing list

Reply via email to