Language support for unambiguous text string and byte array typesPage added by Justin Ross
(1) Since we use a box type, Variant, in C++, any difficulty interpreting strings is easily handled by qualifying the value container. It doesn't seem like too much of a stretch to me to also take this approach with bindings for languages that don't offer disambiguated types. (2) C++ 11 doesn't seem to have a dedicated type for unicode. It has wide characters (not the same thing), and it has literal syntax for unicode strings. These resolve, however, to arrays of char, char16_t, or char32_t, so there's not type signal we can easily use to figure out the developer's intention. (3) I know too little about perl to say what's going on here. Scalar::Util reftype seems to offer a way to get more type info. Perl has an array type, but its use for byte arrays doesn't appear to be recommended. [jross@localhost ~]$ perl -e 'use Scalar::Util qw(reftype); my $foo = "hello"; print reftype(\$foo) . "\n"' SCALAR [jross@localhost ~]$ perl -e 'use Scalar::Util qw(reftype); my $foo = "hello"; print reftype([]) . "\n"' ARRAY
Stop watching space
|
Change email notification preferences
View Online
|
Add Comment
|
- [CONF] Apache Qpid > Language support for unam... Justin Ross (Confluence)
- [CONF] Apache Qpid > Language support for... Gordon Sim (Confluence)
- [CONF] Apache Qpid > Language support for... Justin Ross (Confluence)
- [CONF] Apache Qpid > Language support for... Justin Ross (Confluence)
- [CONF] Apache Qpid > Language support for... Justin Ross (Confluence)