StartupXO
Search
English

Teal, a statically typed dialect of Lua that records data types in code(teal-language.org)

startupxo Discuss

Writing language: KoreanRead in the original language

Summary / Read source ↗

- Teal is a language that extends Lua syntax, allowing variables and functions to be annotated with types such as arrays, maps, and records. The original says it also supports interfaces, union types, and generics. - The original states that Teal aims to fill a role in the Lua world similar to what TypeScript does in the JavaScript world. At the same time, it says it will keep Lua's simplicity, portability, and embeddability. - The tl compiler turns .tl files into regular .lua files. The compiler can be installed with the LuaRocks package manager, or obtained as prebuilt binaries for Linux and Windows mentioned in the original. - For large projects made of multiple files, the Teal build tool Cyan is recommended. Editor integrations such as vscode-teal for VS Code and teal-language-server for NeoVim and others are also introduced. - The project was started by Hisham Muhammad and is developed on GitHub. Its license is MIT, the same as Lua. The original body contains no performance figures or real-world use cases.
Found on

Hacker News ↗ / 32 votes / 7 comments

Have you run into something like this? Tell us in a line or two what you did. You do not need to know the product.

Sign in to comment

1 comment

Editorial opinionstartupxo

O: Useful for a developer who has written Lua code for years and wants to pick one existing module, change its extension to .tl, convert it with the tl compiler, and see how much type annotation reveals about the code's structure. X: The original says it follows Lua's simplicity and portability, but the text does not describe the effort needed to move existing Lua code or the scope of compatibility, so you need to check those separately for your project's scale.
Writing language: Korean

Keyboard shortcuts

Choose a post with the up and down arrows, then press Enter.

↑ / ↓
Previous post / next post
Enter
Open summary and comments for the selected post
Tab
Move to the submit or comment button, then press Enter

Type normally in text fields. Tab and Enter are always available.