[ 
https://issues.apache.org/jira/browse/PROTON-447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16371583#comment-16371583
 ] 

Alan Conway commented on PROTON-447:
------------------------------------

It is not possible to add information to immediate type instances, which 
includes many numerics, Symbol, TrueClass/FalseClass etc. Such types are passed 
and copied by value, not by reference, so extra information would be lost. 
There would be a hefty performance cost in boxing every numeric type with a 
by-reference class. 

Needs careful thought, and is only relevant for round-trip encodings. Should be 
optional or on-demand. The Data type already provides access to the AMQP type 
code separately from the value, so the user can already solve the round trip 
problem - this is really about making that simpler for important cases, which 
we need to identify. For example round-tripping an AMQP map or list while 
preserving types is possible but not simple with the current API. 

> Ruby types returned from Data should carry their AMQP type
> ----------------------------------------------------------
>
>                 Key: PROTON-447
>                 URL: https://issues.apache.org/jira/browse/PROTON-447
>             Project: Qpid Proton
>          Issue Type: Improvement
>          Components: ruby-binding
>            Reporter: Darryl L. Pierce
>            Assignee: Alan Conway
>            Priority: Minor
>             Fix For: proton-c-0.21.0
>
>
> When a value is pulled out of a Qpid::Proton::Data type, such as a float or 
> integer, it should somehow carry with it its AMQP type. So, for example, if 
> the value returned is a ulong (represented as a Fixnum) then that should be 
> attached to the Fixnum so that it can potentially be put back into another 
> Data instance without losing that detail.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to