unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Undocumented procedures
@ 2012-01-02  3:04 Mike Gran
  2012-01-03  9:15 ` rixed
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mike Gran @ 2012-01-02  3:04 UTC (permalink / raw)
  To: guile-devel

Hi-

I was auditing some code to make sure I was only using 

documented procedures.  I came across a couple I've used
that aren't documented.  I can write a doc patch
but first I thought I'd check to see that they are intended
to be API.


scm_display
scm_puts
scm_new_port_table_entry
scm_sym2var

Regards,

Mike Gran




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Undocumented procedures
  2012-01-02  3:04 Undocumented procedures Mike Gran
@ 2012-01-03  9:15 ` rixed
  2012-01-03 22:05 ` Ludovic Courtès
  2012-01-07 23:48 ` Andy Wingo
  2 siblings, 0 replies; 6+ messages in thread
From: rixed @ 2012-01-03  9:15 UTC (permalink / raw)
  To: guile-devel

> I came across a couple I've used that aren't documented.
> (...)
> 
> scm_display
> scm_puts

These two are "documented" in the sense that they are used in the
manual, more precisely in chapter about smob for the print_image()
sample function.
So they are mean to be public I guess.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Undocumented procedures
  2012-01-02  3:04 Undocumented procedures Mike Gran
  2012-01-03  9:15 ` rixed
@ 2012-01-03 22:05 ` Ludovic Courtès
  2012-01-03 22:28   ` Mike Gran
  2012-01-07 23:48 ` Andy Wingo
  2 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2012-01-03 22:05 UTC (permalink / raw)
  To: guile-devel

Hi!

And happy new year!  :-)

Mike Gran <spk121@yahoo.com> skribis:

> scm_display

A matter of adding it as a @deffnx below ‘display’ under “Scheme Write”.

> scm_puts

This and scm_putc should be documented, yes.

> scm_new_port_table_entry

Actually the whole port subsystem is undocumented.  :-(  So yes, would
be great to document.

> scm_sym2var

It’s public for historical reason, but I personally don’t like it,
because it has a stupid name and complex semantics.  ;-)

Depending on what you’re doing, you may be able to use one of the scm_c_
functions in modules.h.  WDYT?

Anyway, patches appreciated on the doc front!

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Undocumented procedures
  2012-01-03 22:05 ` Ludovic Courtès
@ 2012-01-03 22:28   ` Mike Gran
  2012-01-07 23:24     ` Andy Wingo
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Gran @ 2012-01-03 22:28 UTC (permalink / raw)
  To: Ludovic Courtès, guile-devel@gnu.org

> From: Ludovic Courtès <ludo@gnu.org>
 >>  scm_display
> 
> A matter of adding it as a @deffnx below ‘display’ under “Scheme Write”.
> 
>>  scm_puts
> 
> This and scm_putc should be documented, yes.
> 
>>  scm_new_port_table_entry
> 
> Actually the whole port subsystem is undocumented.  :-(  So yes, would
> be great to document.

OK.  I'll try to come up with a patch for the above 3.
 
> 
>>  scm_sym2var
> 
> It’s public for historical reason, but I personally don’t like it,
> because it has a stupid name and complex semantics.  ;-)
 
> 
> Depending on what you’re doing, you may be able to use one of the scm_c_
> functions in modules.h.  WDYT?

It always bothered me, though, that the many scm_c_lookup and
scm_c_{public,private}_* procedures have so many non-local exits.
It does seem like a lot of C code is necessary just to check if a
variable is there or not, since you have to catch all the exceptions.
 
> 
> Anyway, patches appreciated on the doc front!
 
I'll see what I can do.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Undocumented procedures
  2012-01-03 22:28   ` Mike Gran
@ 2012-01-07 23:24     ` Andy Wingo
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Wingo @ 2012-01-07 23:24 UTC (permalink / raw)
  To: Mike Gran; +Cc: Ludovic Courtès, guile-devel@gnu.org

On Tue 03 Jan 2012 23:28, Mike Gran <spk121@yahoo.com> writes:

>> From: Ludovic Courtès <ludo@gnu.org>
>>>  scm_sym2var
>> 
>> It’s public for historical reason, but I personally don’t like it,
>> because it has a stupid name and complex semantics.  ;-)
>  
>> 
>> Depending on what you’re doing, you may be able to use one of the scm_c_
>> functions in modules.h.  WDYT?
>
> It always bothered me, though, that the many scm_c_lookup and
> scm_c_{public,private}_* procedures have so many non-local exits.
> It does seem like a lot of C code is necessary just to check if a
> variable is there or not, since you have to catch all the exceptions.

What about scm_c_public_variable ?  Granted, it will exit nonlocally if
the module doesn't exist and have a public interface, but it does return
#f if the name is not bound in the given module.

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Undocumented procedures
  2012-01-02  3:04 Undocumented procedures Mike Gran
  2012-01-03  9:15 ` rixed
  2012-01-03 22:05 ` Ludovic Courtès
@ 2012-01-07 23:48 ` Andy Wingo
  2 siblings, 0 replies; 6+ messages in thread
From: Andy Wingo @ 2012-01-07 23:48 UTC (permalink / raw)
  To: Mike Gran; +Cc: guile-devel

On Mon 02 Jan 2012 04:04, Mike Gran <spk121@yahoo.com> writes:

> scm_new_port_table_entry

As Ludo says, the port implementation is terrible underdocumented.  But,
this function isn't really so great.  It is what is available in 2.0,
but in 2.2 there are a couple of versions that work better:
scm_c_make_port, and scm_c_make_port_with_encoding.  We can probably
backport one or both to stable-2.0 if that's the thing to do, dunno.

So do look at the code in `master' before doing any serious
documentation for ports.

Cheers,

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-01-07 23:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-02  3:04 Undocumented procedures Mike Gran
2012-01-03  9:15 ` rixed
2012-01-03 22:05 ` Ludovic Courtès
2012-01-03 22:28   ` Mike Gran
2012-01-07 23:24     ` Andy Wingo
2012-01-07 23:48 ` 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).