Thrift list as a mutable type -
as taken thrift website's documentation, thrift list "an ordered list of elements. translates stl vector, java arraylist, native arrays in scripting languages, etc." why these lists expressed mutable types? doesn't promote slower object types don't take advantage of native arrays? don't understand why default - - translation of list in thrift mutable array type.
as taken thrift website's documentation, thrift list "an ordered list of elements. translates stl vector, java arraylist, native arrays in scripting languages, etc." why these lists expressed mutable types?
one has keep in mind type system of thrift designed portability across languages first , important goal in mind. that's reason why there signed integers.
furthermore, idl types should considered abstract concept, describes more intent of particular type rather referring concrete syntax construction in, let's say, java, c++ or python. leads second part of question:
doesn't promote slower object types don't take advantage of native arrays? don't understand why default - - translation of list in thrift mutable array type.
the mapping idl type down concrete implementation particular target language lies in responsibility of implementation of both thrift compiler , thrift library language in question. in other words, no means set in concrete , can (at least theoretically) changed @ time changing implementations.
but goal not build many roadblocks , potholes developer. besides being fast , efficient, should easy use generated code , library, should easy whatever code wants them. example, c# classes generated partial classes offer more flexibility. while immutable types may more efficient in cases, may cause more work in other cases. @ end, kind of balancing act.
if can think of improvement, above no means intended stop proposing quality patches. if ideas can making thrift better, more welcome , gladly review your patches or pull requests.
Comments
Post a Comment