81 ms·
Teal – A statically-typed dialect of Lua
- alanh 1y agoOh, clever name. Typed Lua → TL → "Tee Ell" → Teal And the extension is .tl
- Sharlin 1y agoOff-topic comment, but as an ESL speaker I just this week randomly learned that teal the color is named after the duck species Anas crecca, called (edit: common or Eurasian) teal in English.
- seafoamteal 1y agoI'm one of today's lucky 10_000 apparently! Only learned that just now.
- nozzlegear 1y agoTIL! My wife is a photographer and she's been photographing a ton of Blue-winged Teals over the last couple months during their migration. I assumed that the ducks had been named after the color.
- Sharlin 1y agoCool! (Just to be clear, I meant the common, or Eurasian, teal whose iridescent green head markings the color’s apparently named after. The NA teals are closely related, although it seems they were assigned to their own genus in 2009 as it was discovered that the then-Anas was not monophyletic.) Generally colors are named after things in nature and not the other way around, given that the latter would’be had names for a long time, and most color names are comparatively recent inventions, driven by modern dyes and pigments and status, fashion, etc concerns. A West European peasant in the 11th century would’ve known the bird well, possibly trapped them for food, but would’ve had very little need for a separate word for ”blue-green”. The history of color words is quite interesting. There’s a specific progression that almost all languages have gone through. It’s fairly well known that many East Asian languages don’t have separate names for ”blue” and ”green” at all (except as modern loans). Accordingly, they don’t usually make the distinction mentally, one could think that they simply consider them hues of ”cyan”.
- 3036e4 1y agoAbout blue and green, I know absolutely nothing about this, but I was randomly Wikipedia-surfing a few days ago and found the long page on this topic that is interesting (but has the scary warning at the top about multiple issues). https://en.wikipedia.org/wiki/Blue%E2%80%93green_distinction_in_language https://en.wikipedia.org/wiki/Blue%E2%80%93green_distinction...
- wslh 1y agoThere is another TEAL (uppercase) programming language: <https://developer.algorand.org/docs/get-details/dapps/avm/teal/ https://developer.algorand.org/docs/get-details/dapps/avm/te...>
- tkzed49 1y agoI vote we give the name to the lua one!
- 90s_dev 1y agoSeconded.
- ayrtondesozzla 1y agoI think you and GP both mean that this TEAL is adjacent to crptocurrency, and therefore, who cares about stepping on toes? This heuristic works well in most cases maybe, but will lead to false positives sometimes. May I gently suggest that this might be one of those cases. Algorand is the project of this fellow https://en.m.wikipedia.org/wiki/Silvio_Micali https://en.m.wikipedia.org/wiki/Silvio_Micali Credentials aren't faultless but they do provide a certain web of trust. If you browse the academic and professional history of this fellow, I think you'll agree. Algorand is, I think, as serious and sincere a research project as any other.
- 90s_dev 1y agoI meant that I have a sort of affection for Lua, so it gets preferential treatment in my book, and therefore Teal ought to get the name above another relatively random project with the same name.
- ayrtondesozzla 1y agoAh ok - fair enough :)
- 1y ago
- 90s_dev 1y agoI'm so relieved to see more types being added to good languages. So Teal is to Lua as TypeScript is to JavaScript. Which means it automatically plays well with any Lua environment. Unlike luau and nelua which are also statically typed but have their own runtimes. What version of Lua does it use? Lua gets new versions every few years so I don't know why so many impls don't continuously upgrade to the latest version.
- 90s_dev 1y ago> The core compiler has no dependencies and is implemented as a single tl.lua file which you can load into your projects. Running tl.loader() will add Teal support to your package loader, meaning that require() will be able to run .tl files. Genius design.
- RS-232 1y agoLua is a good language. It's like C, if C were a scripting language. It's got an awesome C API. It's fast, lightweight, and embeddable. It's more performant than Python. It's a staple in video game scripting.
- 90s_dev 1y agoIt's nothing like C, and that's so much of its charm. Semantically, Lua is almost identical to the core of JavaScript. Metatables are a genius alternative to prototype chains. Lua's syntax is beautifully simple and unambiguous, but at the cost of being moderately inconvenient in 2025 unfortunately. It could benefit from an ESNext-style renewal. I get why they made the C API that way, but in practice it's very easy to get wrong. I'm not sure how fast vanilla Lua is today compared to similar languages. I think LuaJIT (and Luau?) are most often used when performance is needed.
- growlNark 1y agoSure, if you compare via semantics Lua and Javascript make sense to liken. But in terms of complexity, Lua is far more like C. There's no unfucking all the horrible decisions baked into javascript and I wouldn't touch it with a ninety-foot pole, but Lua still has some hope.
- 90s_dev 1y agoTuples: {number, string} Arrays: {number} How does it disambiguate it? Are single-element tuples just never used in practice? To be fair, maybe the only time I've had to use them in TypeScript is via Parameters<T>
- johnisgood 1y agoNow I am curious what {number, string, number} would be considered as.
- hisham_hm 1y agoit's a three element tuple.
- johnisgood 1y agoThat was my guess, just as {n, n, n, n} would be a four element tuple, right?
- hisham_hm 1y agoIn our experience, single-element tuples are just never used in practice. There has been some discussion on how to add syntax for them, but I think it's more of a desire for orthogonality than for a practical need.
- 90s_dev 1y agoYeah I can't imagine any scenario where it's not just a value or an array of values that happens to have only one value right now.
- rfl890 1y agoIs it implemented as a compiler, tl, which compiles .tl source code into .lua files? Who knows
- nmz 1y agoIsn't that called a transpiler?
- hisham_hm 1y ago"Transpiler" is a common term for source-to-source compilers in the industry, but compiler is the more general term (i.e. a transpiler is a kind of compiler). In academia, the term "transpiler" is somewhat sneered at. A source-to-source compiler is still a compiler, because conceptually compiling into assembly is also technically source-to-source.
- HexDecOctBin 1y agoHas anyone used this? Any reviews? Based on the Github issues, the type system seems to have some holes in it, but it's not obvious how bad is it in real world.
- hombre_fatal 1y agoI used it to write a couple Pico-8 games a year or two ago since Lua + dynamic typing is a major obstacle for me managing game code over time. Teal worked well for that.
- andre-la 1y agoI'm using it for my game
- pmarreck 1y agoI've been diving into Lua (a little late to this party, but turns out it's a perfect language to rewrite some commandline scripts I had that were getting unwieldy in Bash, especially with LLM assistance!) and it's really something of an eye-opener. LuaJITted Lua code runs at 80% (on average, sometimes faster!) of the compiled C version of the same algorithm, typically. Lua is embedded in a surprisingly massive number of products: https://en.wikipedia.org/wiki/List_of_applications_using_Lua https://en.wikipedia.org/wiki/List_of_applications_using_Lua The startup time of a script is in nanoseconds. An "echo" written in Lua runs faster than the native echo implementation. The only warts so far are 1-based indexing (you get used to it), and the fact that LuaJIT is stuck at Lua 5.1 while Lua itself is up to 5.3 or 5.4 and has added some niceties... with Lua proper running slower. And no real standard library to speak of (although some would argue that's a feature; there are a few options and different flavors out there if that's what you need, though- Such as functional-flavored ones...) Anyway, there's nothing else like it out there. Especially with its relative simplicity. There are also some neat languages that compile to (transpile to?) Lua, and deserve more attention, such as YueScript https://yuescript.org/ https://yuescript.org/, which is a still actively-updated enhanced dialect of MoonScript https://moonscript.org/ https://moonscript.org/ (described as "Coffeescript for Lua", although it hasn't been updated in 10 years) although neither of these are typed. HOWEVER... there IS this: TypescriptToLua https://typescripttolua.github.io/ https://typescripttolua.github.io/, which takes advantage of ALL the existing TypeScript tooling, it just outputs Lua instead of JS!
- const_cast 1y ago> but turns out it's a perfect language to rewrite some commandline scripts I had that were getting unwieldy in Bash IMO this is the perfect use case for Perl. I mean, it's why Perl was invented, but to this day it remains incredibly good at doing this specific task. It's incredibly easy to write and can be very easy to read, and it's much more robust than bash. But best of all - and the reason I think Perl still has a place in the modern world - it's available on practically every computer on Earth. And it will all work. It's so backwards-compatible that 25 year old scripts will run just fine. It's so portable that nothing even comes close. Also, it's shockingly fast. Faster than you would think. Regex is really powerful and it's been the template for so many regex implementations, but definitely be careful of runaway time complexity. Anyway, Lua is great too. Really nice for embedding into applications ala VBA. Great for config.
- pansa2 1y ago> Teal is a statically-typed dialect of Lua. I was expecting Teal to be "Lua + type annotations", similar to Mypy. However from a quick look it does indeed seem to be a "dialect" in its own right. Teal is Lua-like and compiles to Lua, but there's more to it than just static types. Perhaps it's more similar to TypeScript? For example, Teal replaces Lua's tables - the language's signature single, highly-flexible data structure - with separate arrays, tuples, maps, records and interfaces. It changes the variable scoping rules and even adds macro expressions. Teal therefore seems substantially more complex than Lua. The author recognizes this in the conclusion to a recent presentation [0]: Lua is "small and simple", maybe Teal is "something else"? Lua is for "scripting", maybe Teal is better suited to "applications/libraries"? [0] https://youtu.be/Uq_8bckDxaU?t=1618 https://youtu.be/Uq_8bckDxaU?t=1618
- Benjamin_Dobell 1y agoYou can get pretty far by bolting annotations onto Lua (no compilation step), for example using my IDE: https://github.com/Benjamin-Dobell/IntelliJ-Luanalysis https://github.com/Benjamin-Dobell/IntelliJ-Luanalysis Admittedly, I've been focused on some other things recently, but still with some focus on type safety e.g. https://breaka.club/blog/godots-most-powerful-scripting-language https://breaka.club/blog/godots-most-powerful-scripting-lang...
- lifthrasiir 1y agoThat was a major concern when I was using Lua at work. Pretty much every type checker in Lua required transpiling, which doesn't work for many environments (e.g. Redis script). My Kailua [1] was designed that in mind but didn't reach its full potential. [1] https://github.com/devcat-studio/kailua/ https://github.com/devcat-studio/kailua/
- wyldfire 1y ago> Perhaps it's more similar to TypeScript? Funny you should mention that: > It aims to fill a niche similar to that of TypeScript in the JavaScript world, but adhering to Lua's spirit of minimalism, portability and embeddability.
- 90s_dev 1y ago
- max0563 1y agoThis is super cool. I have been using TypeScript To Lua (https://github.com/TypeScriptToLua/TypeScriptToLua https://github.com/TypeScriptToLua/TypeScriptToLua) for a little game side project and it works quite well, I am pleased with it. It does end up generating a lot of Lua code though because it has to support all of TypeScript’s features, which isn’t ideal. I’d expect Teal’s output to be much more concise Lua which has me interested.
- hisham_hm 1y agoTeal's output is currently pretty much 1-to-1 with the input apart from removing all of the type information of course. (I've been trying hard to keep it that way so that the error messages in stack traces match the input lines without having to do source mapping.)
- kachapopopow 1y agoLooks way too similar to Luau.
- CobrastanJorji 1y agoThis is very cool. I wonder if it works with Roblox, which is probably the environment with the largest number of Lua programmers. It certainly looks like it should work basically anywhere Lua works.
- fithisux 1y agoThe use their dialect of Lua. Luau, stuck on 5.1 (correct me if I am wrong) like LuaJit for performance reasons. It is gradually typed, so no need to use Teal.
- LoganDark 1y ago> Luau, stuck on 5.1 (correct me if I am wrong) like LuaJit for performance reasons. It's not just for performance reasons, and they don't exactly have no features from newer versions. Take a look at the compatibility tables: https://luau.org/compatibility https://luau.org/compatibility
- fithisux 1y agoMainly on 5.1 Actually I love luau the stuck was not expressed as negative, sorry If I gave the wrong impression.
- phant0mas 1y agoYou can also check this talk from Hissam last fosdem https://fosdem.org/2025/schedule/event/fosdem-2025-6147-what-should-teal-be-musings-on-foss-project-directions/ https://fosdem.org/2025/schedule/event/fosdem-2025-6147-what...
- kuruczgy 1y agoHow confident are you in the soundness of the type system? Also, are there any Lua constructs that are difficult/impossible to type? Is type checking decidable? (Is the type system Turing complete?)
- pansa2 1y ago> How confident are you in the soundness of the type system? Teal's types are hints, like Python's and TypeScript's, so I suspect it's not sound by design. > Also, are there any Lua constructs that are difficult/impossible to type? Teal includes several types that model typical uses of Lua tables, e.g. as arrays, maps etc. It doesn't look like it can type fully general use of Lua tables, e.g. using both the "array part" and "hash part" of the same table.
- lolinder 1y agoPeople get this way about TypeScript too, and it always perplexes me. These projects are about adding types to untyped languages, and that comes with a few givens: * Your type system cannot be sound. It's going to have escape hatches and exceptions because that's how dynamic languages roll. * There will always be constructs that you can't type. See above. * If your type system is going to usefully type enough of the ecosystem, it will be Turing complete. All of these things are the trade-offs you make when you set out to layer types on a dynamic language, and they're well worth it to get 99% of the way to type safety in a language that otherwise couldn't scale. Theoretical purity is meaningless if the language isn't useful.
- kuruczgy 1y ago> Your type system cannot be sound. It's going to have escape hatches and exceptions because that's how dynamic languages roll. I think you could prove that you can't construct a sound & complete type system for Lua. But just saying "Your type system cannot be sound" by itself is definitely wrong. I don't understand why people are throwing out both soundness & completeness, instead of at least retaining one (and I think the choice here is pretty obvious, a sound but incomplete type system is much more useful than an unsound one). From Flow's website[1] (a type checker for JavaScript): > Flow tries to be as sound and complete as possible. But because JavaScript was not designed around a type system, Flow sometimes has to make a tradeoff. When this happens Flow tends to favor soundness over completeness, ensuring that code doesn't have any bugs. I don't understand why other type systems for dynamically typed languages cannot strive for that, and in particular I am pretty salty at TypeScript for explicitly not caring about soundness. [1]: https://flow.org/en/docs/lang/types-and-expressions/#toc-soundness-and-completeness https://flow.org/en/docs/lang/types-and-expressions/#toc-sou...
- koeng 1y agoI really love teal! Here is a 10k loc project I have in it - https://github.com/Koeng101/libB/blob/dev/src/dnadesign/dnadesign.tl https://github.com/Koeng101/libB/blob/dev/src/dnadesign/dnad... - Basically, I reimplemented all my synthetic biology bioinformatics from Go into teal so that LLMs can script with it better in a hermetic environment. It's got all sorts of things like cloning simulation, codon optimization, genbank parsing, synthesis fixing, reliable sequence hashing, sequence analysis, etc. I'm pretty sure it is a more complete synbio library than anything in python, actually. A couple things I want from teal: 1. I wish there was a better way to bundle files together. I have a little build.lua, but eh, I think it could be better. I know of cyan and everything but I feel like that was developed for a different application than mine. I want to have 1 complete file that I can just give people and allow them to do synbio work in any target language with a lua machine. 2. There are some annoyances around luajit vs lua5.1 functionality 3. The compiler yelling at you gets old for integrating raw lua. I tried to port json.lua in and even with the definition file, I couldn't embed the whole json.lua without having compiler errors. So eventually I just imported it as a string that is type checked, which is bad 4. I really wish syntax highlighting on github was a thing The good bits: It's pretty much complete. I used it a couple years ago and there were things with generics that I just couldn't do, but now it is much better. For example, how I use generics for the different parsers (fastq, fasta, genbank, slow5, pileup, etc) https://github.com/Koeng101/libB/blob/dev/src/dnadesign/src/bio/bio.tl https://github.com/Koeng101/libB/blob/dev/src/dnadesign/src/... Overall, love it! It is one of those pieces of software which is nearly complete, and I love using software like that.
- hisham_hm 1y agoTeal creator here! Thank you for the kind words, super happy to see people being productive with it!! On your wishlist items: 1. There are a few third-party projects that bundle Lua code. One that comes to mind is https://lrocket.codeberg.page/ https://lrocket.codeberg.page/ — I don't know if this functionality should be brought into Teal itself, it sounds to me like something better left to the surrounding tooling? 2. Unfortunately those annoyances are part of the heterogeinity of the Lua ecosystem, but Teal tries to paper over them using the compat53 library (which, granted, is not available everywhere if you want to do a pure-Lua deployment on existing Lua environments). The --gen-target and --gen-compat flags should still help some, hopefully! 3. Not sure what you mean there -- you mean adding chunks of untyped Lua _in the same file_? I think that if you have a json.lua and a json.d.tl file, then it should use the definition file only and leave the .lua file alone. At least that's the intended behavior! 4. That's up to GitHub :) Last time I checked their docs I think they want something like 100 or 200 projects using the language for considering adding native highlighting for it on the website. But you can add a .gitattributes file to the root of your repository like this https://github.com/teal-language/tl/blob/master/.gitattributes https://github.com/teal-language/tl/blob/master/.gitattribut... and at least it will display .tl files with .lua highlighting. Again, thank you so much for the feedback!
- sitkack 1y agoSee also https://ravilang.github.io/ https://ravilang.github.io/ https://nelua.io/ https://nelua.io/
- russellbeattie 1y agoOof. What is it about the devs who prefer static typing that they insist on bolting it onto every scripting language they can? It's nearly a compulsive disorder. There's plenty of languages with compile time type safety, just go use one of them and leave the perfectly good dynamic ones alone. Static typing proponents need accept that dynamic typing is a perfectly valid way to write and run code: It's way less verbose, it focuses code on logic rather than syntax (a.k.a. "scripting"), it's easier to mentally parse and generally easier to both learn and use. Inflicting types on every piece of code written is just ridiculous.
- nmz 1y agoBecause when your project reaches the 10k lines mark, you want something telling you "Woops, that function you declared only accepts numbers as the first parameter" and there's nothing preventing lua to have minimal compile time safety while also being backward compatible in fact, I think one of the lua transpilers allowed for function (n number, s string, a) (a is any type here)
- russellbeattie 1y ago> "...when your project..." Oof. The same old excuse. So you prematurely optimize your code based on a theoretical line count in the future, cluttering your code with redundant information to save yourself from that one bug you'll encounter in QA anyways. Got it. Makes total sense. I bet you like Java FactoryFactoryImpls as well. If you already know your code will reach 10 kloc in a project where catching a type related bug is that important, choose an appropriate type safe language. So many wasted man hours dealing with truly pedantic details.
- nmz 1y ago> If you already know your code will reach 10 kloc in a project where catching a type related bug is that important, choose an appropriate type safe language. So many wasted man hours dealing with truly pedantic details. Oh... like teal?
- yyx 1y agoI'm getting `TypeError: e is null` by opening this website in a new tab. Firefox 138.0.1
- hisham_hm 1y agoPlease try again, shouldn't be happening, hopefully!
- johnisgood 1y agoSame, Chromium-based browser on Linux.
- xlii 1y agoI really want to like Lua but I just can’t. Tried Lua/Fennel/even Teal but I just can’t. I can’t tell what it is exactly. Maybe those weird global rules? Maybe inspection of objects and metatables? Maybe the weird mix of verbose and not verbose (e.g. getting output of a process requiring popen and manual handling but then function can take more arguments than declared and whateva) or exotic control flow and structures (metatable, global env). It’s interesting language, but I just grit my teeth every time I’m interacting with it.
- deleted 1y ago[deleted]
- sundarurfriend 1y agoThere's a type declaration file for the vim global that's defined by default in Neovim: https://github.com/teal-language/teal-types/blob/master/types/neovim/vim.d.tl https://github.com/teal-language/teal-types/blob/master/type... to be used via `global_env_def` described in https://teal-language.org/book/declaration_files.html https://teal-language.org/book/declaration_files.html And though they mention it as being for third party libraries, this also seems a way to declare types for your own code in an external file, thus keeping your code as runnable Lua and benefiting from type checking too. That seems like a neat workflow for developing Neovim plugins with this: instead of having to constantly regenerate Lua from .tl files so Neovim can pick up your changes during development. Edit: or maybe https://github.com/teal-language/tl#loading-teal-code-from-lua https://github.com/teal-language/tl#loading-teal-code-from-l... this is the easier way to do it. `require` and use `loader` during development, generate the Lua once things are somewhat stable.
- andreypopp 1y ago> this also seems a way to declare types for your own code in an external file, thus keeping your code as runnable Lua and benefiting from type checking too The declaration file isn't used to typecheck the code the declaration is for. It is only for consumers of the code.
- sundarurfriend 1y agoAh that's a shame. I was hoping it would work via sidecar files like Ruby's RBS [1] or Python's stub files [2] I was editing my comment during your reply, and added this: > or maybe https://github.com/teal-language/tl#loading-teal-code-from-lua https://github.com/teal-language/tl#loading-teal-code-from-l... this is the easier way to do it. `require` and use `loader` during development, generate the Lua once things are somewhat stable. Does that sound like the right idea then? [1] https://github.com/ruby/rbs https://github.com/ruby/rbs [2] https://mypy.readthedocs.io/en/stable/stubs.html https://mypy.readthedocs.io/en/stable/stubs.html
- k__ 1y agoI tried it for one project, but converted it to TypeScript-to-Lua instead. I used Lua on the backend and my frontend was already in TypeScript, so it was nice that I could reuse the backend types without conversion in the frontend.
- 0xFEE1DEAD 1y agoYears ago, I tried lua and wasn't impressed. Then I started using Neovim, did the necessary configuration in lua, but continued writing my own scripts in vimscript. Later I started using wezterm and decided to give lua a second shot, and I began to really like it. I realized my initial dislike for lua stemmed from my experience with javascript (back in the jwquery days), where maintaining large codebases felt like navigating a minefield. The lack of type system made it all too easy to introduce bugs. But lua isn't like that. It's not weakly typed like javascript - it's more akin to pythons dynamic duck typing system. Its simplicity makes it remarkably easy to write clean maintainable code. Type checking with type is straightforward compared to python, mostly because there are only five basic types (technically seven but I've never used userdata or thread). And I even started to enjoy using metatables once I understood how and when to apply them. That being said, lua's lack of popularity probably stems from its limited stdlib, which often feels incomplete, and the absence of a robust package manager. luarocks is a pain to work with. All that being said, I don't really see the point of using this project. While I do wish type annotations were a native feature, the ones provided by the lsp are good enough for me.
- augusto-moura 1y agoBTW, you might want to check Lux [1], it's a new approach for Lua packaging. They launched it recently, so there's a lot of work going on. But it looks and feels very promising [1]: https://github.com/nvim-neorocks/lux https://github.com/nvim-neorocks/lux
- 0xFEE1DEAD 1y agoOh wow I didn't know someone was actually working on an alternative. It really does look promising. Thank you, definitely going to try it.
- 90s_dev 1y ago> But lua isn't like that. It's not weakly typed like javascript - it's more akin to pythons dynamic duck typing system What? No, Lua's type system is practically identical to JavaScript's. Even metatables are extraordinarily similar to prototype chains via __index (though much more powerful since they allow for operator overloading, which I wish JS had).
- nicoloren 1y agoI really like Lua and I work with it almost daily. But, I hate luarocks. It just don't work well on Windows. And I don't know why. The management of external libraries makes Lua still too difficult to use, which is a real shame considering the qualities of this programming language.
- paranoidxprod 1y agoSomething to keep an eye out for is Lux: https://github.com/nvim-neorocks/lux https://github.com/nvim-neorocks/lux. Looks like a promising replacement to Luarocks, but is still pretty early in development.
- pesnk 1y agoI'm glad this project isgetting bigger. I remember wathcing the creator hacking on it on twitch back in a day.
- samiv 1y agoAfter having embedded Lua in my game engine and having worked with some Lua games I've come to conclusion that: - Lua is great from the integrator/engine dev perspective. It's easy to embed and there are several libraries that help with creating bindings between Lua and your game classes. - Lua has absolutely terrible runtime performance especially when the GC stalls. You soon learn that you have to start moving code to the native side and carefully consider the APIs that you provide for the game so that you can even dream of any type of performance. Haven't tried LuaJIT since that doesn't work with WASM so it's not an option for me. - The loose runtime typing in Lua is absolutely terrible, and while it's easy and fast to knock up some simple script you really pay the price when you try to maintain or refactor your code and you have no typing information. For the game engine developer this also makes it very hard to provide any kind of help for the game developer, i.e. "intellisense" kind of functionality. I've basically "solved" this by assuming that variables have certain name suffixes and prefixes and when those are present I assume that it has a certain type which lets me provide a list of functions in the script editor to the game developer. Far from perfect. [see link below] https://github.com/ensisoft/detonator/blob/master/screens/editor-script.png https://github.com/ensisoft/detonator/blob/master/screens/ed...
- spookie 1y agoAny alternatives you've tried that are better in those areas?
- augusto-moura 1y agoThe lua language service [1] supports type annotations inside comments [2]. Sure, it is not the same as having types as first class citizens, but I would say that it solves 95% of the editor support and typying problems you mentioned in your 3rd point. But yeah, PUC-Rio Lua is not fast, but it is acceptable, and maybe one of the most performant of all non-JIT dynamic languages. If you need speed, JIT is a requirement. [1]: https://luals.github.io/ https://luals.github.io/ [2]: https://luals.github.io/wiki/annotations/ https://luals.github.io/wiki/annotations/
- Llamamoe 1y agoIt's a shame you can't use LuaJIT. It's one of if not THE highest performance JIT out there.
- pakigrapeparty 1y ago[flagged]