[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] handling the undefined value
From: |
F. Wittenberger |
Subject: |
Re: [Chicken-users] handling the undefined value |
Date: |
Thu, 18 Nov 2010 21:42:03 +0100 |
Am Mittwoch, den 17.11.2010, 23:53 +0100 schrieb Felix:
> From: Jörg "F. Wittenberger" <address@hidden>
> Subject: [Chicken-users] handling the undefined value
> Date: Wed, 17 Nov 2010 20:56:29 +0100
>
> > Hi Chickeners!
> >
> > I ran into a rare "call of undefined value" -- somewhere in the middle
> > of several KLOC of code.
> >
> > So how to debug that? It turns out not to be an easy operation. Hence
> > my idea here.
> >
> > So far I see two basic approaches to handle the "undefined" behaviour of
> > standards: a) refuse to return any result (rarely in Scheme
> > implementations, since an 'if' without failure clause would have to
> > raise an exception if in tail position - from the top of my head I'm not
> > even sure whether or not this would still be compliant to any Scheme
> > standard; but its the default in strongly typed languages) b) return
> > some arbitrary value (be it a randomly chosen one or a distinguished
> > value like in chicken.
> >
> > I'd welcome a warning message in case (a) -- instead of refusing to
> > compile the source.
>
> Does it give a compile-time error or does this error happen at
> run-time?
I've not been clear enough. I meant to say: I'd welcome if the
srcutinizer would give a warning in case it finds an undefined value in
tail position.
((The error I see is at runtime ("call of undef"). But I'm afraid the
called, undefined value has been passed around for some time, thus even
if I would find the spot of the reference, I'lL still have to go back to
the caller sites.))
> >
> > But while it would be bad to refuse to compile one-branch-if's in tail
> > position (and better return whatever value), I'd love to have an option
> > (at compile or runtime) to turn that particular value called "undefined
> > value" into an error iff it appears in any argument position.
>
> The scrutinizer could give a warning in this case.
If that's possible!
- [Chicken-users] handling the undefined value, F. Wittenberger, 2010/11/17
- Re: [Chicken-users] handling the undefined value, Felix, 2010/11/17
- Re: [Chicken-users] handling the undefined value,
F. Wittenberger <=
- Re: [Chicken-users] handling the undefined value, Felix, 2010/11/17
- Re: [Chicken-users] handling the undefined value, F. Wittenberger, 2010/11/18
- Re: [Chicken-users] handling the undefined value, Felix, 2010/11/19
- Re: [Chicken-users] handling the undefined value, F. Wittenberger, 2010/11/19
- Re: [Chicken-users] handling the undefined value, Felix, 2010/11/20
- [Chicken-users] NE [[not exactly]]: handling the undefined value, F. Wittenberger, 2010/11/21
- [Chicken-users] Re: NE [[not exactly]]: handling the undefined value, Felix, 2010/11/22
- Re: [Chicken-users] handling the undefined value, F. Wittenberger, 2010/11/22
- Re: [Chicken-users] handling the undefined value, Felix, 2010/11/24