chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-janitors] Re: #32: get tinyclos egg for chicken 4 to work


From: Chicken Trac
Subject: [Chicken-janitors] Re: #32: get tinyclos egg for chicken 4 to work
Date: Tue, 10 Nov 2009 00:09:26 -0000

#32: get tinyclos egg for chicken 4 to work
------------------------+---------------------------------------------------
 Reporter:  felix       |       Owner:  tonysidaway
     Type:  defect      |      Status:  assigned   
 Priority:  major       |   Milestone:             
Component:  extensions  |     Version:  4.0.5      
 Keywords:  tinyclos    |  
------------------------+---------------------------------------------------

Comment(by tonysidaway):

 Moving on I've discovered two bugs in the primitive class system.  Both of
 these bugs also exist in Chicken 3.4.0, which I have downloaded and
 installed.

 1: describe-object encounters an error if given an instance of a primitive
 class.  For instance in evaluating (describe-object #t) or (let ((a 1
 ))(describe-object a)), the describe-object generic reports that it has
 run out of methods.

 Looking at the class hierarchy, <primitive> is a direct descendant of
 <top>, and describe-object only has methods for <object> and its
 descendants.  The problem seems to go away if I define an ad hoc describe-
 object method for <primitive>, so this is probably a simple case of
 omission of a required method from the generic describe-object in the code
 of the egg.

 2: it is possible to use "make" to create an instance of a primitive
 class, but the resulting object cannot be evaluated.  (let ((o (make
 <object>))) o) evaluates to #<object> but (let ((b (make <boolean>))) b)
 goes into a black hole during evaluation of b.

 I would expect "make" to special-case the creation of primitives,
 evaluating not to a Tinyclos instance but to an object of the underlying
 Scheme type with a predictable value (for instance (make <boolean>) could
 create the object #f, (make <integer>) could create the object 0, and
 (make <char>) could create the character #\x000 and (make <string>) could
 create the object "").  There are alternative strategies which might make
 more sense, but the point is that the primitive classes don't really work
 properly at present and this should probably be easy to fix in a way that
 makes sense in the context of Scheme.

-- 
Ticket URL: <http://www.irp.oist.jp/trac/chicken/ticket/32#comment:15>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]