From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: Re: API naming bugs Date: Fri, 30 Dec 2005 21:27:43 +0200 Message-ID: <873bkawfkg.fsf@zagadka.de> References: <1135557850.8094.8.camel@localhost.localdomain> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1135970880 31242 80.91.229.2 (30 Dec 2005 19:28:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 30 Dec 2005 19:28:00 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Dec 30 20:27:58 2005 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EsPut-0000fD-LO for guile-devel@m.gmane.org; Fri, 30 Dec 2005 20:27:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EsPwJ-0007yp-NV for guile-devel@m.gmane.org; Fri, 30 Dec 2005 14:29:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EsPwE-0007yV-07 for guile-devel@gnu.org; Fri, 30 Dec 2005 14:29:18 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EsPwD-0007xk-3x for guile-devel@gnu.org; Fri, 30 Dec 2005 14:29:17 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EsPwC-0007xe-Vr for guile-devel@gnu.org; Fri, 30 Dec 2005 14:29:17 -0500 Original-Received: from [213.243.153.35] (helo=smtp2.pp.htv.fi) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EsPwm-0004y4-1V for guile-devel@gnu.org; Fri, 30 Dec 2005 14:29:52 -0500 Original-Received: from zagadka.ping.de (cs181072157.pp.htv.fi [82.181.72.157]) by smtp2.pp.htv.fi (Postfix) with SMTP id 59109296BD2 for ; Fri, 30 Dec 2005 21:27:46 +0200 (EET) Original-Received: (qmail 3001 invoked by uid 1000); 30 Dec 2005 21:27:45 +0200 Original-To: Andy Wingo In-Reply-To: <1135557850.8094.8.camel@localhost.localdomain> (Andy Wingo's message of "Sun, 25 Dec 2005 19:44:10 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5561 Archived-At: Andy Wingo writes: > 1) functions that take C types normally are named scm_c_*. There are a > few exceptions though: The rule is that scm_c_foo is mostly the same as scm_foo, only with a different calling convention that is easier for C. For example, we have scm_vector_length and scm_c_vector_length. The former is exactly 'vector-length' and returns the length as a SCM value, while the latter returns the length as a size_t. Functions named scm_to_foo and scm_from_foo are concerned with converting the representation of a value between the SCM and foo types. The names are a bit hackish since the scm_ prefix is actually part of the meaning: "SCM to foo". The viewpoint of this set of functions is that on one side everything is represented as SCM and we don't need to say what sub-type of SCM is actually required or produced. For example, it simply is scm_to_int, not scm_number_to_int or scm_exact_integer_to_int or even scm_exact_integer_that_fits_into_int_to_int ;-). > - scm_from_locale_symbol[n] -- here's a confusing name, perhaps > scm_c_symbol_from_locale_string is more apt I agree that this is not totally self-describing since there is no 'symbol' type in C. We silently make the assumption that C-side symbols would be nul-terminated arrays of characters, just like strings. > - scm_frame_begin, unwind_handler, etc -- should change because there > is also a SCM-based scm_frame interface Yeah, that's unfortunate. we have two things that are termed a "frame": he things dealt with by scm_frame_begin, etc, and the frames of a captured stack. When designing the scm_frame_begin stuff, I didn't think about those "other" frames, and when I finally noticed that there is a terminology overlap, ... I refused to think too much about it since I wanted to use the nice name for my stuff as well... Hmm. Ideally, I think the captured stack frames should be called "stack frames". Opinions? > 2) NEWS talks about SCM_FRAME_WIND_EXPLICITELY, but code is (correctly) > EXPLICITLY Yep, that's my permanent spelling mistake. Sometimes I think it is easier to change the English orthography than to fix my typos. Thanks! -- GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel