unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* trunc, round as primitive generics
@ 2004-04-23 21:11 Kevin Ryde
  2004-05-18 21:10 ` Marius Vollmer
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Ryde @ 2004-04-23 21:11 UTC (permalink / raw)


In 1.6, `trunc' and `round' were primitive generics, but are now plain
primitives.  Does that make a difference to anything?


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


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

* Re: trunc, round as primitive generics
  2004-04-23 21:11 trunc, round as primitive generics Kevin Ryde
@ 2004-05-18 21:10 ` Marius Vollmer
  0 siblings, 0 replies; 2+ messages in thread
From: Marius Vollmer @ 2004-05-18 21:10 UTC (permalink / raw)


Kevin Ryde <user42@zip.com.au> writes:

> In 1.6, `trunc' and `round' were primitive generics, but are now plain
> primitives.  Does that make a difference to anything?

I don't think so.  'trunc' and 'round' do not look at the type of
their argument, they use code that is already completely 'generic'.

For example, 'truncate' is

  (define (truncate x)
    (if (< x 0)
        (ceiling x)
        (floor x)))

All type dispatch is done in 'floor' or 'ceiling', which are primitive
generics.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


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


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

end of thread, other threads:[~2004-05-18 21:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-23 21:11 trunc, round as primitive generics Kevin Ryde
2004-05-18 21:10 ` Marius Vollmer

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