[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GH replacement proposal (includes a bit of Unicode)
From: |
Paul Jarc |
Subject: |
Re: GH replacement proposal (includes a bit of Unicode) |
Date: |
Wed, 21 Apr 2004 17:46:32 -0400 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) |
Marius Vollmer <address@hidden> wrote:
> Is there an advantage of having instead
>
> scm_to_bool --- return 0 for #f, 1 for #t, else signal error
It would be more symmetric, as I suggested earlier.
A procedure argument might have defined meanings for #f and #t, and
later it might be extended with defined meanings for other values.
Now suppose a new caller passes 42, expecting the new extended
semantics, but it happens to be calling an old version of the
procedure which only supports boolean values. Having a scm_to_bool
which signals an error here would help detect this problem early.
> What about
>
> scm_from_bool --- return #f for 0, #t for 1, else signal error
I think 1 in C is sufficiently less distinctive than #t in Scheme that
this would not be good.
paul
- GH replacement proposal (includes a bit of Unicode), Marius Vollmer, 2004/04/07
- Re: GH replacement proposal (includes a bit of Unicode), Paul Jarc, 2004/04/07
- Re: GH replacement proposal (includes a bit of Unicode), Marius Vollmer, 2004/04/13
- Delivery failure (address@hidden), Bruce Korb, 2004/04/21
- Re: GH replacement proposal (includes a bit of Unicode), Marius Vollmer, 2004/04/21
- Re: GH replacement proposal (includes a bit of Unicode),
Paul Jarc <=
- Re: GH replacement proposal (includes a bit of Unicode), Dale P. Smith, 2004/04/21
- Re: GH replacement proposal (includes a bit of Unicode), Paul Jarc, 2004/04/21
- Re: GH replacement proposal (includes a bit of Unicode), Kevin Ryde, 2004/04/21
- Re: GH replacement proposal (includes a bit of Unicode), Dirk Herrmann, 2004/04/22
- Re: GH replacement proposal (includes a bit of Unicode), Paul Jarc, 2004/04/22
- Re: GH replacement proposal (includes a bit of Unicode), Dirk Herrmann, 2004/04/22
- Re: GH replacement proposal (includes a bit of Unicode), Dirk Herrmann, 2004/04/24
- Re: GH replacement proposal (includes a bit of Unicode), Marius Vollmer, 2004/04/24
- Re: GH replacement proposal (includes a bit of Unicode), Dirk Herrmann, 2004/04/25
- Re: GH replacement proposal (includes a bit of Unicode), Paul Jarc, 2004/04/25