On Mon, Jan 22, 2007 at 11:59:58PM +0800, Lalo Martins wrote: > On Mon, 22 Jan 2007 10:07:43 -0500, Peter Amstutz wrote: > > Quick technical design question I wanted to throw out for debate: > > unsigned types. The current s5 design calls for 8, 16, 32 and 64 bit > > signed and unsigned integer types, in addition to single- and > > double-precision floats. It recently occurred to me that some important > > languages don't have unsigned types (Java being the main one, but also > > many dynamically typed languages only have a single "integer" or > > "number" type). > > > > Does it make sense to axe unsigned types from the basic core types in > > the interests of harmony between languages, or do we want as diverse a > > set of basic types as possible and leave it up to the language binding > > to deal with it? (Then you have to figure out what the correct behavior > > is when you pass in a negative number to an unsigned type...) > > Python doesn't have unsigned types, but the functions that convert data > between C and Python know about them. I'm not quite partial either way; I > like unsigned for blobs, as you say. Although arguably blobs should be > strings...
Alternately we could also have a "blob" type for this case. With regard to "strings" (meaning text), I've been thinking that it should be a separate type that includes the encoding. This would be distinct from "symbols" which are particular VOS core strings like method names, child name, fields tags, etc. The reasoning being the latter would be managed in a symbol table to reduce memory usage and speed up string compares (simplifying a symbol compare to comparing pointers). Also, I would like to address internationalization issues in the next iteration of VOS, but I don't know much about it, so advice (such as what the best way is to handle unicode) is would be greatly appreciated. Back to the topic of unsigned types, as I said they are more elegant for certain purposes where negative values are undefined, like a length or offset of a list. It's not that big of a deal, but I want to try to strike the right balance between the capabilities of C++ and scripting/ other languages we want VOS to talk to. [ Peter Amstutz ][ [EMAIL PROTECTED] ][ [EMAIL PROTECTED] ] [Lead Programmer][Interreality Project][Virtual Reality for the Internet] [ VOS: Next Generation Internet Communication][ http://interreality.org ] [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ]
signature.asc
Description: Digital signature
_______________________________________________ vos-d mailing list vos-d@interreality.org http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d