lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


For what it's worth, I didn't expect it but string.pack / string.unpack
has been the single most useful feature in Lua 5.3 for me. It motivated
me to switch several work and personal projects from 5.2 to 5.3.

In one project in particular, I was using struct to read a proprietary
file format which depends on the source architecture on other
architectures. I had to use several tricks with the offset to work
around the different alignments. string.unpack has a feature to set a
custom alignment which makes it much easier.

So, many thanks to the team for this feature which, I think, deserves
its place in Lua! For those who don't like it, why not just compile it
out?

-- 
Pierre Chapuis