This is the second game I've found out recently that is written in Lua. The first one one being - Beyond All Reason.
What do I think about Lua after shipping a project with 60k lines of code?
41–50 of 146 posts
Re: What do I think about Lua after shipping a project with 60k lines of code?
#42Earlier quoted context omitted.
Much like C++ then — the machine code to which it translates lacks types! A TS compiler will reject an ill-typed program. You of course can just strip the type syntax and get a valid (though buggy) JavaScript code.
> Much like C++ then — the machine code to which it translates lacks types! Ehh, not exactly. Most C++ compilers won't output machine code for inputs they don't understand. Though of course, you could simply translate some C++ code yourself into machine code and then say C++ is just like TypeScript in that way. "If you turn C++ into machine code, the machine code lacks types!" "If you turn TypeScript into JavaScript,…
Sorry, I think you've been swindled.
The Typescript compiler is made by Miscrosoft and is called tsc. It very much heeds the type annotations, and very much rejects ill-typed programs. An LSP based on it does the same in an editor. Also tsc supports refinement types via flow control analysis and a bunch of other static correctness checks.
Deno, bun, swc are not true compilers like tsc, they don't do much correctness checking at all. They discard al the type info, and then operate on pure JS (modules conversion, minification, etc).
Re: What do I think about Lua after shipping a project with 60k lines of code?
#43This is the second game I've found out recently that is written in Lua. The first one one being - Beyond All Reason.
Re: What do I think about Lua after shipping a project with 60k lines of code?
#44One big takeaway: a 60k LOC project in Lua is doable, and it will not crumble under its own weight. Surprisingly, LuaJIT is not mentioned even once. Luau is mentioned, Teal is mentioned, Fennel, not. (But Haskell is mentioned!) Little is told about the general code structure, likely because it's dictated by the (C++-based) game engine with Lua bindings. It would be interesting to see an analysis of a comparably large…
Re: What do I think about Lua after shipping a project with 60k lines of code?
#45Re: What do I think about Lua after shipping a project with 60k lines of code?
#46One big takeaway: a 60k LOC project in Lua is doable, and it will not crumble under its own weight. Surprisingly, LuaJIT is not mentioned even once. Luau is mentioned, Teal is mentioned, Fennel, not. (But Haskell is mentioned!) Little is told about the general code structure, likely because it's dictated by the (C++-based) game engine with Lua bindings. It would be interesting to see an analysis of a comparably large…
Re: What do I think about Lua after shipping a project with 60k lines of code?
#47Earlier quoted context omitted.
> Much like C++ then — the machine code to which it translates lacks types! Ehh, not exactly. Most C++ compilers won't output machine code for inputs they don't understand. Though of course, you could simply translate some C++ code yourself into machine code and then say C++ is just like TypeScript in that way. "If you turn C++ into machine code, the machine code lacks types!" "If you turn TypeScript into JavaScript,…
> TypeScript compiler essentially treats types as a lint Sorry, I think you've been swindled. The Typescript compiler is made by Miscrosoft and is called tsc. It very much heeds the type annotations, and very much rejects ill-typed programs. An LSP based on it does the same in an editor. Also tsc supports refinement types via flow control analysis and a bunch of other static correctness checks. Deno, bun, swc are not…
Re: What do I think about Lua after shipping a project with 60k lines of code?
#48Re: What do I think about Lua after shipping a project with 60k lines of code?
#49Earlier quoted context omitted.
> TypeScript compiler essentially treats types as a lint Sorry, I think you've been swindled. The Typescript compiler is made by Miscrosoft and is called tsc. It very much heeds the type annotations, and very much rejects ill-typed programs. An LSP based on it does the same in an editor. Also tsc supports refinement types via flow control analysis and a bunch of other static correctness checks. Deno, bun, swc are not…
I think they are confused by the tslint project, which is different than tsc and is not supported by Microsoft
But I bet on swc, which is used by Deno internally, or on the Bun's built-in transpiler that does things similar to swc or ts-blank: they all assume that the code is semantically correct (not just syntactically valid) Typescript, and then just ignore the Typescript-specific bits.
Re: What do I think about Lua after shipping a project with 60k lines of code?
#50Earlier quoted context omitted.
> Much like C++ then — the machine code to which it translates lacks types! Ehh, not exactly. Most C++ compilers won't output machine code for inputs they don't understand. Though of course, you could simply translate some C++ code yourself into machine code and then say C++ is just like TypeScript in that way. "If you turn C++ into machine code, the machine code lacks types!" "If you turn TypeScript into JavaScript,…
"And even other than that, machine code isn't dynamically typed because it's not typed at all." Well, we have bytes, words, doublewords and quadwords on the machine level. They are usually referred to as data types in the processor manuals.