On Mon, 2009-08-03 at 21:16 +0300, Abdulaziz Ghuloum wrote:
> I always knew this, but today, I became totally convinced how bad an  
> effect this procedure name has on people.  Whoever came up with this  
> name should be punished by typing it 1000 times.  It's so much easier  
> to write (error 'foo ---) even when it's not the correct procedure to  
> use.  Such a stupid name for such a common use.
> 
> Phew.  Now I feel better.

Hehehe.  Yeah, that's why I've got my define/AV, define/?, and
define/?/AV:

> (import (xitomatl define))

> (define/AV (foo x)
    (unless (= 1 x)
      (AV "oops" x))
    (/ x))

> (foo 2)
Unhandled exception
 Condition components:
   1. &assertion
   2. &who: foo
   3. &message: "oops"
   4. &irritants: (2)

> (define/? (bar (x char?))
    (string x))

> (bar 1)
Unhandled exception
 Condition components:
   1. &assertion
   2. &who: bar
   3. &message: "argument check failed"
   4. &irritants: (1)
   5. &argument-name: x
   6. &predicate-expression: char?


-- 
: Derick
----------------------------------------------------------------

Reply via email to