bugKawa - Bugs: bug #49866, make-vector default elements...

 
 

bug #49866: make-vector default elements #!null v #!undefined

Submitted by:  Sudarshan S Chawathe <chaw>
Submitted on:  Fri 16 Dec 2016 04:53:13 PM UTC  
 
Category: Scheme languageSeverity: 3 - Normal
Item Group: Unexpected resultStatus: Fixed
Privacy: PublicAssigned to: Per Bothner <bothner>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 18 Dec 2016 09:30:35 PM UTC, comment #1:

I agree the default should be #!null (and not #!undefined).
One reason is to match the default for creating a native Java array.
I checked in the fix.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Fri 16 Dec 2016 04:53:13 PM UTC, original submission:

The Kawa docs indicate that (make-vector 3) and similar should yield a
vector with #!null elements. However, it seems the elements are
#!undefined instead:

chaw@vereq:~$ uname -a
Linux vereq.eip10.org 3.16.0-4-686-pae #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) i686 GNU/Linux
chaw@vereq:~$ kawa --version
Kawa 2.2 (revision 9049M)
Copyright (C) 2016 Per Bothner
chaw@vereq:~$ kawa
#|kawa:1|# (display (make-vector 3))
#(#!undefined #!undefined #!undefined)
#|kawa:2|#

I realize that R7RS permits arbitrary elements in such uninitialized
vectors but the Kawa docs do seem to provide a guarantee of the elements
being #!null.

For some context, the reason I got into this detail is that I was
looking for a way to refer to a Java null in Kawa without using the
#!null syntax. Reason for that, in turn, is that I'm trying to write a
portable library and Guile uses #!...!# syntax for block comments. I'd
be grateful for other suggestions in this regard too. (I know Guile
permits overriding the #foo syntax, but I was hoping to avoid messing
with reader syntax.)

Sudarshan S Chawathe <chaw>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bothner (Updated the item)
  • -unavailable- added by chaw (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 16 Jan 2017 05:01:55 PM UTCbothnerOpen/ClosedOpen=>Closed
    Sun 18 Dec 2016 09:30:35 PM UTCbothnerStatusConfirmed=>Fixed
    Sun 18 Dec 2016 07:26:30 AM UTCbothnerStatusNone=>Confirmed
      Assigned toNone=>bothner

    Back to the top


    Powered by Savane 3.1-cleanup1