# Teal：让 Lua 拥有静态类型的新方言

Original title: Teal – A statically-typed dialect of Lua

> Hacker News story 50124730 · language: zh · submitted 2026-10-16
> Web version: https://zeli.app/zh/story/50124730
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 181 · by [Lyngbakr](<https://news.ycombinator.com/user?id=Lyngbakr>) · 💬 72
[original](<https://teal-language.org/>) · [HN discussion](<https://news.ycombinator.com/item?id=50124730>)

## Summary

Teal 是 Lua 的一种静态类型方言，它在保持 Lua 极简、便携和可嵌入特性的同时，引入了类型注解，支持数组、映射、记录、接口、联合类型和泛型。就像 TypeScript 之于 JavaScript，Teal 旨在填补 Lua 在类型安全方面的空白。其编译器 tl 能将 .tl 源码转换为标准的 .lua 文件，开发者可通过 LuaRocks 安装，或使用 Cyan 构建工具管理大型项目。社区活跃，支持 Visual Studio Code 和 NeoVim，且项目本身就是用 Teal 编写的。

## Key quote

> Teal 旨在填补类似 TypeScript 在 JavaScript 世界中的生态位，同时坚守 Lua 的极简主义、可移植性和可嵌入精神。

## HN discussion (72 comments)

### [ufo](<https://news.ycombinator.com/item?id=50140999>)

> 一个大型 Teal 代码库的好例子是 Lua 包管理器 Luarocks：https://github.com/luarocks/luarocks/tree/main/src/luarocks

### [Kinrany](<https://news.ycombinator.com/item?id=50139752>)

> 我很好奇有没有和 Luau 的对比。

### [shevy-java](<https://news.ycombinator.com/item?id=50140327>)

> Hisham 是那里的核心开发者之一。他启动了 GoboLinux、htop 等项目。
>
> 就我个人而言，我不是 Lua 的狂热粉丝，因为从字面意义上讲，它确实是一种极其轻量级的语言（包括语法和特性——在我看来太轻了）。不过，看到创造力不断推动事物向前发展，这确实是一件好事。

### [arisAlexis](<https://news.ycombinator.com/item?id=50139447>)

> 在 AI 的新时代，这类实验的目的如果不是为了艺术创作，那又是什么呢？

---

## Cite

- Page: https://zeli.app/zh/story/50124730
- Date: 2026-10-16
- Source: teal-language.org (https://teal-language.org/)
- Hacker News: https://news.ycombinator.com/item?id=50124730

## Other languages

- en: https://zeli.app/story/50124730 · markdown: https://zeli.app/story/50124730.md
- ja: https://zeli.app/ja/story/50124730 · markdown: https://zeli.app/ja/story/50124730.md
- ko: https://zeli.app/ko/story/50124730 · markdown: https://zeli.app/ko/story/50124730.md
- de: https://zeli.app/de/story/50124730 · markdown: https://zeli.app/de/story/50124730.md
- es: https://zeli.app/es/story/50124730 · markdown: https://zeli.app/es/story/50124730.md
- ru: https://zeli.app/ru/story/50124730 · markdown: https://zeli.app/ru/story/50124730.md
