Page 1 of 1

A compile to Lua language for love2D ?

Posted: Thu May 07, 2020 5:37 am
by inJuly
How would you guys feel about a compile to lua language for Love2d that has python like clean indentation based
syntax. (implemented in typescript with VSCode / Atom integration) ?

Simile to one of my older projects (https://github.com/inJuly0/Ave/blob/mas ... ntation.md)

How many of you would use something like that if I went ahead and made it ?
It would take in .ave files and spit out .lua files.

Features would be:

1. Optional strict type checking
2. Clean, indentation based syntax
3. String interpolation
4. Compound assignment operators (value += 1 instead of value = value + 1)
5. Enums , Classes and Object Oriented Programming (simulated via metatables and meta methods)
6. short hand syntactic sugars like `evenArray = i for i in 1, 10 when i % 2 == 0 `
7. constants (JS's const keyword)

I wonder if such a tool would be used by people. Let me know what you guys think

Re: A compile to Lua language for love2D ?

Posted: Thu May 07, 2020 8:44 am
by MrFariator
Just in case you aren't aware, that sounds mighty bit like moonscript, and some people do use it for their love2d projects.

Re: A compile to Lua language for love2D ?

Posted: Thu May 07, 2020 9:04 am
by 4vZEROv
Sound a bit like Moonscript. I don't like Moonscript because it add too much syntax and symbols.
If you keep Lua simplicity why not.

Re: A compile to Lua language for love2D ?

Posted: Thu May 07, 2020 9:23 am
by zorg
I personally don't like the python-esque strict indentation being an important syntax thing... but then again, if you WANT to make this, why listen to randos? Just do it! :3

Re: A compile to Lua language for love2D ?

Posted: Thu May 07, 2020 11:22 am
by inJuly
MrFariator wrote: Thu May 07, 2020 8:44 am Just in case you aren't aware, that sounds mighty bit like moonscript, and some people do use it for their love2d projects.
I actually did not know about moonscript.
That looks a lot about what I had in mind but with a lot of keywords. Thanks for letting me know !
zorg wrote: Thu May 07, 2020 9:23 am I personally don't like the python-esque strict indentation being an important syntax thing... but then again, if you WANT to make this, why listen to randos? Just do it! :3
That's actually because I have a bunch of projects and stuff to learn so I was wondering if I should invest time into this thing at all. I might not do it if I'm the only guy using it. But then again, I can't say for sure.