[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pika-dev] Naming issues in implementing numbers
From: |
Matthew Dempsky |
Subject: |
[Pika-dev] Naming issues in implementing numbers |
Date: |
Sat, 10 Jan 2004 23:23:33 +0100 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
Alright, I've added about 1000 or so lines of code to the pika to
implement numbers and all (not finished yet, but it's quickly
approaching there), and I've come across a few issues...
First, I want to know if there are any objections to renaming files in
libscm-numbers like fixnum.* and double.* to cvt-fixnum.* and
cvt-double.* (with appropriate changes to the remaining files in both
libscm-numbers and libscm-numbers-reps).
The reason for this is two fold: first, I think it would help clear up
that the files simply perform a conversion between internal
representations representations and C representations -- at first I
thought the functions were meant to define constructors and accessors,
but as simple a change as this might make that a little more clear.
Second, in case the first wasn't strong enough, I would like to define
two new types, bignum and bigrat, and, following the pattern defined
in libscm/ and reps/, should name their source files bignum.* and
bignum-imp.* and bigrat.* and bigrat-imp.*, however, this conflicts if
I want bignum and bigrat conversion functions.
(I considered further recommending to rename the functions to
scm_cvt_number_to_fixnum and so forth, but I'm not sure that's
necessary.)
The second change I want to make is simply to rename fixcplxrat to
fixratcplx. The second seems a more consistant naming pattern - any
complex type is defined as it's component types name with a 'cplx'
suffix.
Finally, between the r5rs defined scm_is_complex and
scm_make_rectangular functions, it impairs my choice of names that I
can use consistantly (to define a scm_make_<type> constructor and
scm_is_<type> predicate), but I just recalled Larceny uses rectnum so
I'll probably use that unless someone can recommend a better one.
Also, is using scmx_vtable_object_vtable "portable" for use in
libscm-numbers-reps?
-jivera
- [Pika-dev] Naming issues in implementing numbers,
Matthew Dempsky <=