#1445: Add ResizableStringArray.get_number VTABLE function
-----------------------------+----------------------------------------------
 Reporter:  Austin_Hastings  |       Owner:                                     
       
     Type:  todo             |      Status:  new                                
       
 Priority:  normal           |   Milestone:                                     
       
Component:  none             |     Version:  2.0.0                              
       
 Severity:  medium           |    Keywords:  rsa, ResizableStringArray, 
get_number, NQP
     Lang:                   |       Patch:                                     
       
 Platform:                   |  
-----------------------------+----------------------------------------------

Comment(by whiteknight):

 Can you post the NQP example code that creates this problem?

 A few basic notes:

 First, seems nonsensical to me to expect an Array to return a floating
 point number in any case. Especially in this case where it seems you want
 Parrot to implicitly cast the integer value to a float. It seems to me
 like the better option would be to retrieve the integer value and
 explicitly cast it if that's what you need.

 Second, it seems strange to me that NQP would be forcing all mathematics
 operations to use floating point. Though considering the constraints of
 that language I won't raise a huge fuss over it. I know that it's not
 designed to be a complete and robust mathematics package. Is there any way
 in NQP to explicitly cast from float to int?

 Third, what do the other Array types do in this instance? Is it just RSA
 that's missing the get_number VTABLE, or are other types missing it as
 well? I would much rather we move in a direction of more consistency among
 array types than less consistancy.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1445#comment:1>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to