Fixed-width strings: Difference between revisions

Line 10: Line 10:
# String concatenation creates a tree structure, which is flattened when needed.
# String concatenation creates a tree structure, which is flattened when needed.
# String APIs should be as close to SpiderMonkey string APIs as possible to make ActionMonkey implementation easy.
# String APIs should be as close to SpiderMonkey string APIs as possible to make ActionMonkey implementation easy.
 
# Preferred access to characters is via a charAt() method that returns 32-bit characters regardless of the underlying implementation. Low level API strXX() are available for direct read-only buffer access if really needed.
''SRJ: May I also suggest that a good goal will be for the API to obscure the underlying width of the string (ie, the caller only sees length as count-of-codepoints, never count-of-bytes, and only obtains codepoints in wide form. Otherwise we run the risk of client code making assumptions about the underlying width of the string representation. Of course, this may conflict with existing SM APIs...''


=== Tagged instance contents ===
=== Tagged instance contents ===
55

edits