argument checking, was: About submatrix and its meaning
Subject: argument checking, was: About submatrix and its meaning
From: Robert Dodier
Date: Mon, 23 Nov 2009 09:25:45 -0700
On 11/23/09, Richard Fateman <fateman at cs.berkeley.edu> wrote:
> foo(a,b,c):= (
> check_args(foo,[a,listp],[b,integerp],[[a,b,c], a+b>c]),
This is needlessly clumsy and incomprehensible.
check_args merges into the body of the function where it is
easily overlooked, declarations for all variables are mashed
together, and there is no syntactic clue that the variables are
different from the predicates.
Yes, it's reminiscent of the syntax for other declarations,
but we needn't propagate it any further.
I could be convinced that assert(P(x)) is OK, though.
> The addition of more "syntax" is certainly not required.
Few things are necessary. Where does that leave us?
Robert Dodier