[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Doc organization (Re: Around again, and docs lead role)
From: |
Viktor Pavlenko |
Subject: |
Re: Doc organization (Re: Around again, and docs lead role) |
Date: |
Tue, 13 May 2003 21:07:15 -0400 |
>>>>> "NJ" == Neil Jerram <address@hidden> writes:
NJ> I don't follow this. What is wrong with the following?
NJ> In C:
NJ> scm_call_1 (scm_c_lookup ("my-func"), str);
NJ> In Scheme:
NJ> (define (my-func str)
NJ> (catch #t
NJ> (lambda ()
NJ> ... whatever ...)
NJ> (lambda (key . args)
NJ> ... handle errors ...
... and tell the calling C function about the error somehow...
NJ> )))
But the exception mechanism is much more advanced.
I use scm_internal_catch to convert guile exceptions to C++, and try
{...} catch () { scm_throw(); } in gsubr to convert C++ exceptions to
guile. I call guile and C++ procedures from one another and, since
it's a C++ program that uses guile as extension, have to deal only
with C++ exceptions. A guile script would receive just guile errors.
IMO, error handling mechanism in guile's C API is great, it just needs
some docs and examples.
Re. encouraging people to do more things in Scheme, I agree, but not
by taking away a possibility to do it in C.
Just my opinion.
--
Viktor
- Re: Doc organization (Re: Around again, and docs lead role), (continued)
- Re: Doc organization (Re: Around again, and docs lead role), Neil Jerram, 2003/05/08
- Re: Doc organization (Re: Around again, and docs lead role), Rob Browning, 2003/05/08
- Re: Doc organization (Re: Around again, and docs lead role), David Van Horn, 2003/05/09
- Re: Doc organization (Re: Around again, and docs lead role), Neil Jerram, 2003/05/10
- Re: Doc organization (Re: Around again, and docs lead role), Rob Browning, 2003/05/15
- Re: Doc organization (Re: Around again, and docs lead role), Paul Jarc, 2003/05/15
- Re: Doc organization (Re: Around again, and docs lead role), Bill Schottstaedt, 2003/05/09
- Re: Doc organization (Re: Around again, and docs lead role), Neil Jerram, 2003/05/13
- Re: Doc organization (Re: Around again, and docs lead role),
Viktor Pavlenko <=
- Re: Doc organization (Re: Around again, and docs lead role), Bill Schottstaedt, 2003/05/14
- Re: Doc organization (Re: Around again, and docs lead role), Mikael Djurfeldt, 2003/05/15
- Re: Doc organization (Re: Around again, and docs lead role), Max Techter, 2003/05/16
- Re: Doc organization (Re: Around again, and docs lead role), Ricard Mira, 2003/05/18
Re: Doc organization (Re: Around again, and docs lead role), tomas, 2003/05/09