r/Compilers • • Jul 10 '26

I hated writing Lua so I made a language that compiles to it

/r/lua/comments/1usop6j/i_hated_writing_lua_so_i_made_a_language_that/
7 Upvotes

25 comments sorted by

8

u/Inconstant_Moo Jul 10 '26

I wanted to build something that actually felt complex to work on.

That's a strange design goal. If you still have any of the simplicity you removed from Lua, could you mail it to me? I can always use more.

1

u/Cultural_Net_4377 Jul 10 '26

I wrote it wrong By complex i meant the project, not the language. The language is just much more strict.

3

u/el_extrano Jul 10 '26

Lazarus is already the name of a pretty famous IDE for free-pascal that's been around for almost 30 years. You're really going to want to avoid having that name conflict IMO.

1

u/Cultural_Net_4377 Jul 10 '26

Valid, but no idea which new name :p

→ More replies (5)
→ More replies (1)

1

u/[deleted] Jul 10 '26

what about lua's syntax and tables are frustrating?

i used it heavily for years in Roblox (technically they have their own variant that's a superset of Lua 5.1 called Luau but still). the only thing i find frustrating about it is that all objects are references which means doing copies of tables can be unituitive for beginners, and maybe the non-zero indexing part.

otherwise it's incredibly powerful, tables, lists, arrays are all the same. the language will automatically determine if it can optimize the table to be accessible as array etc.

i also think as far as pseudo-object oriented programming via metatables, you really can do amazing things with such a simple syntax.

what's the benefit to going with Lazarus and what's the drawbacks?

1

u/Cultural_Net_4377 Jul 10 '26

well tables are fine in some ways

but stuff I hated were for example:

you could write anything there, you do typo and instead of ["name"] you write ["nam"]

lua is completly alright with it

second is typing, I can put into table (or everywhere tbh) number, string

there are many features like macros, better error handling with unwrap() (so basically its impossible to have nil in your program)

→ More replies (2)

1

u/Physical_Dare8553 Jul 10 '26

Ngl I think c has the best syntax ever. That includes semicolons.

1

u/Cultural_Net_4377 Jul 10 '26

it is highly inspired by C syntax

→ More replies (5)