Comment by ModernMech

Comment by ModernMech 10 hours ago

3 replies

Thanks that does answer my question! Had you considered parsing a subset of lua to get the properties you want? That way users don't have to learn a whole other syntax. I'm thinking in particular of my students whom I teach lua. They struggle enough learning one language, having to teach a second with all its quirks seems like a lot to throw at them.

mrcjkb 4 hours ago

That's a neat idea, but it would mean we'd have to maintain our own library. When editing with the CLI, you have to make sure you preserve comments, which the toml-edit crate does quite well.

NuclearPM 9 hours ago

Do you think that is more difficult than explaining to the students why they can’t use loops in their lua config files?

  • ModernMech 8 hours ago

    I wouldn't present it to them as "these config files are the same thing as Lua but without loops", but instead "these are config files and they have the same syntax as the Lua records we just learned about". And I would prefer that over "these are config files and they have a different syntax as the Lua records we just learned about." Although I can see merits on discussing that syntax differences exist between languages, that tends to overwhelm people learning their first language.