lua-carbon / carbon

The standard library Lua never had!
zlib License
30 stars 6 forks source link

'Twine' Object #33

Open LPGhatguy opened 9 years ago

LPGhatguy commented 9 years ago

It would be neat to have an object designed to quickly concat sets of strings, potentially without reallocation. The name is inspired from LLVM's Twine class, which they use to take lists of strings and throw them into a single buffer at once.

This could be more effective than table.concat for frequently called methods, or even seldom called methods that require lots of different concatenating characters or large buffers.

It could inherit (or pseudo-inherit) from List and be used for intermediate steps and string buffering, much like in other platforms.

LPGhatguy commented 9 years ago

This should have mechanics similar to Tuple.