* On quitting and exiting
@ 2013-03-14 4:40 Mike Gran
2013-03-14 5:14 ` Nala Ginrut
2013-03-14 8:55 ` Andy Wingo
0 siblings, 2 replies; 4+ messages in thread
From: Mike Gran @ 2013-03-14 4:40 UTC (permalink / raw)
To: guile-devel
Hello.
There seem to be four ways to force an exit.
In boot-9, a function `quit' is defined. It appears in the manual,
but, in boot-9 it can take an argument. In the manual it never
takes an argument.
In boot-9, `exit' is aliased to quit. In the manual `exit' is
undocumented; however, in the documentation in (rnrs programs),
it notes that (rnrs programs)'s version of exit is the same
as the "core" version of exit.
And then there is primitive-exit and primitive-_exit, which are
described in the manual.
So clearly, there's some confusion here. Are 'quit' and 'exit'
supposed to be API? Is the fact that they can take an argument
supposed to be documented?
Or is 'primitive-exit' the generally the way to go?
Thanks,
Mike
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: On quitting and exiting
2013-03-14 4:40 On quitting and exiting Mike Gran
@ 2013-03-14 5:14 ` Nala Ginrut
2013-03-14 6:13 ` Thien-Thi Nguyen
2013-03-14 8:55 ` Andy Wingo
1 sibling, 1 reply; 4+ messages in thread
From: Nala Ginrut @ 2013-03-14 5:14 UTC (permalink / raw)
To: Mike Gran; +Cc: guile-devel
On Wed, 2013-03-13 at 21:40 -0700, Mike Gran wrote:
> Hello.
>
> There seem to be four ways to force an exit.
>
> In boot-9, a function `quit' is defined. It appears in the manual,
> but, in boot-9 it can take an argument. In the manual it never
> takes an argument.
>
> In boot-9, `exit' is aliased to quit. In the manual `exit' is
>
> undocumented; however, in the documentation in (rnrs programs),
> it notes that (rnrs programs)'s version of exit is the same
> as the "core" version of exit.
>
> And then there is primitive-exit and primitive-_exit, which are
> described in the manual.
>
> So clearly, there's some confusion here. Are 'quit' and 'exit'
> supposed to be API? Is the fact that they can take an argument
> supposed to be documented?
>
> Or is 'primitive-exit' the generally the way to go?
>
>
[Out of topic]
Many cool things in Guile lacks of document, maybe I should drop to look
forward to adding new features to Guile but do some help for manual
first...
> Thanks,
>
> Mike
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: On quitting and exiting
2013-03-14 5:14 ` Nala Ginrut
@ 2013-03-14 6:13 ` Thien-Thi Nguyen
0 siblings, 0 replies; 4+ messages in thread
From: Thien-Thi Nguyen @ 2013-03-14 6:13 UTC (permalink / raw)
To: guile-devel
[-- Attachment #1: Type: text/plain, Size: 978 bytes --]
() Nala Ginrut <nalaginrut@gmail.com>
() Thu, 14 Mar 2013 13:14:42 +0800
Many cool things in Guile lacks of document, maybe I should drop to
look forward to adding new features to Guile but do some help for
manual first...
That is basically the labor of love that i did (and have since been
trying to recover from the subsequent correlated side{h,tr}acking) for
Unofficial Guile 1.4.x. For example, both ‘quit’ and ‘exit’ are
documented (and have been so for many years) at:
http://www.gnuvola.org/software/guile/doc/Procedure-Index.html
Probably this year (knock on wood) i will get around to forward porting
some of the doc-manglement-fu from 1.4.x to 1.8.x. The hardest part is
letting go of the "docstrings must differ from manual documentation"
mentality (inspired by Emacs) that is IMHO no longer valid for Guile.
Once that is done, the rest is pleasantly pedestrian text toolsmithing.
--
Thien-Thi Nguyen
GPG key: 4C807502
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: On quitting and exiting
2013-03-14 4:40 On quitting and exiting Mike Gran
2013-03-14 5:14 ` Nala Ginrut
@ 2013-03-14 8:55 ` Andy Wingo
1 sibling, 0 replies; 4+ messages in thread
From: Andy Wingo @ 2013-03-14 8:55 UTC (permalink / raw)
To: Mike Gran; +Cc: guile-devel
On Thu 14 Mar 2013 05:40, Mike Gran <spk121@yahoo.com> writes:
> In boot-9, a function `quit' is defined. It appears in the manual,
> but, in boot-9 it can take an argument. In the manual it never
> takes an argument.
>
> In boot-9, `exit' is aliased to quit. In the manual `exit' is
>
> undocumented; however, in the documentation in (rnrs programs),
> it notes that (rnrs programs)'s version of exit is the same
> as the "core" version of exit.
>
> And then there is primitive-exit and primitive-_exit, which are
> described in the manual.
>
> So clearly, there's some confusion here. Are 'quit' and 'exit'
> supposed to be API? Is the fact that they can take an argument
> supposed to be documented?
>
> Or is 'primitive-exit' the generally the way to go?
`primitive-_exit' is the C `_exit' function. It quits immediately,
without calling atexit() functions.
`primitive-exit' is the C `exit' function. It runs atexit() functions
and then quits.
The Scheme `exit' function throws `quit', which is handled by the
outermost catch handler, which calls the C `exit' function. In this way
calling Scheme's `exit' unwinds the dynamic stack.
They should all be documented.
Hope that helps,
Andy
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-14 8:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-14 4:40 On quitting and exiting Mike Gran
2013-03-14 5:14 ` Nala Ginrut
2013-03-14 6:13 ` Thien-Thi Nguyen
2013-03-14 8:55 ` Andy Wingo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).