Alan Manuel Gloria:

> Anyway as I mentioned before I'm using readable sweet-expressions for
> a ridiculously large project...

> So far here are my experiences...
> 
> Using SUBLIST after a 'define for anything other than either 'begin or
> 'cond is a recipe for confusion:
> 
> define foo(x y) $ let ((z compute-something(x))) ; don't do this
> !  whatever

Okay.  I'm not sure why you would want "begin" after define (in Scheme).

> Using SUBLIST after a 'define for 'cond is actually quite cute, and it
> works well for *nested* cond in particular:
> 
> define foo(x y) $ cond
> ! berber?(x) $ cond
> !   catfish?(y) $ blast-it x y
> !   #t          $ kaboom x y
> ! rufruf?(x) $ reduce-to-little-bits x y
> ! #t         $ incinerate x y

Interesting.  You use "$" more than I would, but given the prevalence of 
"cond", this does make sense.  It seems that the idiom is:
STUFF $ cond
! condition1 $ result1
! condition2 $ result2

> Using SUBLIST for let variables is cute:
> 
> let
> ! $ single $ compute x y z
> ! use single
> let
> ! \\
> !   double-x $ compute x y z
> !   double-y $ compute y z x
> ! use double-x double-y

By "cute" I presume you mean "useful" :-).

> You don't need 'when.  You might want 'unless, but 'not is just a few
> more characters away, and 'unless gets a lot less attractive with the
> SUBLIST-begin idiom:
> 
> if pred?(x) $ begin
>   do-something()
>   do-another-thing()

Obviously you *can* use "when" anyway:
when pred?(x)
!  do-something()
!  do-another-thing()

I personally prefer the *look* of the "when" approach above.  The problem is 
that "when" is not universal in Scheme; it's not in R5RS.  Anyway, the if... 
begin is definitely good-looking.

I wonder if there are other constructs that become less important if you use 
"$".

--- David A. Wheeler

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Readable-discuss mailing list
Readable-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/readable-discuss

Reply via email to