chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Another define bug and a question


From: felix winkelmann
Subject: Re: [Chicken-users] Another define bug and a question
Date: Tue, 7 Jun 2005 09:10:57 +0200

On 6/7/05, Reed Sheridan <address@hidden> wrote:
> A self-explanatory snippet:
> 
> #> (define-macro (foo) "foo")
> #> (foo)
> "foo"
> #> (define foo 1)
> #> foo
> Error: invalid syntax in macro form: foo
> #> (foo)
> "foo"
> #>
> 
> That's without the -hygienic flag.  With the -hygienic flag, foo is
> redefined as 1 as you would expect.

Macros and procedures live in a different namespace in the
low-level macro system. The example above is simply wrong,
but admittedly the error message could be improved.

> 
> Now for my question for the BDFL: when do you think error checking is
> important?  When is an unchecked argument a bug and when is it a
> performance feature?  I would prefer it if everything checked its
> arguments and gave an informative error message rather than garbage
> output or something like "Error: (car) bad argument type: 1" when the
> erroneous input finally reaches a function that checks its arguments 3
> stack frames down.  But my performance needs are not very demanding,
> and since you went for fast and dangerous and disabled argument checks
> in SRFI-14 (leading to erroneous output if you give some functions bad
> arguments, which I almost reported before realizing that checks were
> purposely disabled), it's obvious that my opinion is not unanimous.  I
> don't want to waste my time or yours with bogus "bug" reports.
> 

I disabled the calls to `check-arg' in srfi-14.scm since the checks are
made anyway, albeit a bit deeper inside the library functions. This will
give less informative error messages, that's true.

I can enable it again, if you like - no problem. Or you can send me a patch.

Just to make things clear: I'm not trying to be fast and dangerous. Mostly
I just like to remove redundancy. 

I'm not performance-centric. I just have limited time and resources for
keeping up with chicken maintenance.


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]