(eq? (vector) (vector)) should evaluate to #t

Bug #179978 reported by Abdulaziz Ghuloum
2
Affects Status Importance Assigned to Milestone
Ikarus Scheme
Fix Released
Wishlist
Abdulaziz Ghuloum

Bug Description

(vector) and (string) should not allocate new data.
Also, maybe, (make-vector 0) and (make-string 0) too should not allocate.

Changed in ikarus:
assignee: nobody → aghuloum
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Michael D. Adams (mdmkolbe) wrote :

Would that be legal for R6RS? The spec says that "vector" returns a "newly allocated vector". That makes it sound like "(vector)" could actually be a valid way to create a gensym.

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote : Re: [Bug 179978] Re: (eq? (vector) (vector)) should evaluate to #t

On Jan 2, 2008, at 9:08 PM, Michael D. Adams wrote:

> Would that be legal for R6RS? The spec says that "vector" returns a
> "newly allocated vector". That makes it sound like "(vector)" could
> actually be a valid way to create a gensym.

The only way to tell is by using "eq?", and eq?/eqv?
is unspecified on empty strings, vectors, bytevectors,
and records containing no mutable fields.

 From section 11.5:

   The eq? and eqv? predicates are guaranteed to have the
   same behavior on symbols, booleans, the empty list, pairs,
   procedures, non-empty strings, bytevectors, and vectors,
   and records. The behavior of eq? on number objects and
   characters is implementation-dependent, but it always re-
   turns either #t or #f, and returns #t only when eqv? would
   also return #t. The eq? predicate may also behave differ-
   ently from eqv? on empty vectors, empty bytevectors, and
   empty strings.

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

Fixed in revision 1329.

Changed in ikarus:
status: Confirmed → Fix Committed
Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

This bug report is about to be closed as the fix comitted
previously will be incorporated in the next 0.0.3 release of
Ikarus Scheme, scheduled for January 31, 2008. A release
candidate tarball is available for download from:
http://www.cs.indiana.edu/~aghuloum/ikarus/ikarus-0.0.3-rc1.tar.gz
Please do test it if you have the time and report any issues
you might encounter. Thank you very much for your support.
(Sorry for the duplicates; I'm updating every open bug.)

Changed in ikarus:
milestone: none → 0.0.3
Changed in ikarus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.