unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* The new class fraction
@ 2003-11-25 21:23 Mikael Djurfeldt
  2003-11-25 21:46 ` Mikael Djurfeldt
  0 siblings, 1 reply; 3+ messages in thread
From: Mikael Djurfeldt @ 2003-11-25 21:23 UTC (permalink / raw)
  Cc: djurfeldt, guile-devel

2003-11-18  Marius Vollmer  <marius.vollmer@uni-dortmund.de>

	* objects.c (scm_class_fraction): New. 

It is great to have rational numbers in Guile's number tower.

However, why have you chosen the type name "fraction" rather than
"rational" as is the name used in for example Common Lisp?

I suggest quickly changing the name to <rational> before <fraction>
sticks.

M


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


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

* Re: The new class fraction
  2003-11-25 21:23 The new class fraction Mikael Djurfeldt
@ 2003-11-25 21:46 ` Mikael Djurfeldt
  2003-11-26 10:38   ` Matthias Koeppe
  0 siblings, 1 reply; 3+ messages in thread
From: Mikael Djurfeldt @ 2003-11-25 21:46 UTC (permalink / raw)
  Cc: djurfeldt

Mikael Djurfeldt <mdj@mit.edu> writes:

> 2003-11-18  Marius Vollmer  <marius.vollmer@uni-dortmund.de>
>
> 	* objects.c (scm_class_fraction): New. 
>
> It is great to have rational numbers in Guile's number tower.
>
> However, why have you chosen the type name "fraction" rather than
> "rational" as is the name used in for example Common Lisp?
>
> I suggest quickly changing the name to <rational> before <fraction>
> sticks.

Hmm... on second consideration.  Probably we should keep <fraction> as
the concrete class representing fractions and introduce the abstract
class <rational>, with subclasses <integer> and <fraction> so that
membership of class <rational> is equivalent to the result of a call
to the predicate rational?.

M


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


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

* Re: The new class fraction
  2003-11-25 21:46 ` Mikael Djurfeldt
@ 2003-11-26 10:38   ` Matthias Koeppe
  0 siblings, 0 replies; 3+ messages in thread
From: Matthias Koeppe @ 2003-11-26 10:38 UTC (permalink / raw)
  Cc: guile-devel, marius.vollmer

Mikael Djurfeldt <mdj@mit.edu> writes:

> Mikael Djurfeldt <mdj@mit.edu> writes:
>
>> 2003-11-18  Marius Vollmer  <marius.vollmer@uni-dortmund.de>
>>
>> 	* objects.c (scm_class_fraction): New. 
>>
>> It is great to have rational numbers in Guile's number tower.
>>
>> However, why have you chosen the type name "fraction" rather than
>> "rational" as is the name used in for example Common Lisp?
>>
>> I suggest quickly changing the name to <rational> before <fraction>
>> sticks.
>
> Hmm... on second consideration.  Probably we should keep <fraction> as
> the concrete class representing fractions and introduce the abstract
> class <rational>, with subclasses <integer> and <fraction> so that
> membership of class <rational> is equivalent to the result of a call
> to the predicate rational?.

Actually, the name of the concrete class representing fractions is
called RATIO in Common Lisp.  It is a subclass of RATIONAL.

-- 
Matthias Koeppe -- http://www.math.uni-magdeburg.de/~mkoeppe


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


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

end of thread, other threads:[~2003-11-26 10:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-25 21:23 The new class fraction Mikael Djurfeldt
2003-11-25 21:46 ` Mikael Djurfeldt
2003-11-26 10:38   ` Matthias Koeppe

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).