Lurker News

Comments (58) 12 threads

Show all comments

Showing thread 5 of 12

gonzus1 reply#
In my experience, tying your data format to a programming language is a mistake you most likely will pay for later. For example, when you need access to that data from a different programming language.
code_biologist2 replies#
I agree, but Lua is the singular language that might just maaaybe be the exception to that sometimes.

If you need to access the data from a different language, you just load Lua in the other language.

aa-jv1 reply#
Many non-Lua folks don't understand this point: once you've got it in Lua you can put it in anything, anywhere.
strenholme#
One nice thing about Lua is that there are Lua implementations in Rust, C, C#, Go, Javascript, Kotlin, and there’s even a compiler which converts Lua scripts in to native machine code.
tcfhgj1 reply#
While I am even doing that in a project if mine, I'd rather not load Lua and instead just run `serde_json::from_str()` or similar.
chii#
using json is an option (which is mentioned in the article). But lua gives you some features that json cannot match - it's powerful, may be too powerful tbh.