hn.today

Teal – A statically-typed dialect of Lua

teal-language.org4 points0 comments
Screenshot of Teal – A statically-typed dialect of Lua

Teal is a statically typed dialect of Lua that adds optional type annotations and a small type system on top of Lua while preserving the language's minimalism, portability and embeddability. It supports annotated functions, arrays, maps, records, interfaces, union types and generics, and is implemented as a compiler called tl that emits plain .lua files so typed code runs anywhere Lua runs. The project positions itself as Lua's counterpart to TypeScript: it brings static guarantees and developer tooling without changing runtime semantics or imposing a heavy runtime footprint. A simple annotated function shows how parameters and return values get explicit types while regular Lua interop remains intact.

Tooling and ecosystem focus on practical adoption: a browser playground lets you try the compiler interactively, the compiler is installable via LuaRocks or with prebuilt binaries, and Cyan is recommended for building larger Teal projects. Editor integrations and a language server exist for VS Code and NeoVim. Documentation and a series of recorded talks trace design motivations and progress over several years, development is hosted on GitHub with community forums and Matrix chat, the project began with Hisham Muhammad, is written in Teal itself, and is released under the MIT license.

Read on teal-language.org0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

JDK 28

JDK 28

JDK 28 is the upcoming release of the Java SE Platform, featuring improvements like Shenandoah GC and structured concurrency. The release process includes bug fixes and small enhancements, with early-access binaries available under the GPL. (openjdk.org)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.