新领域专用语言(DSL)如何在大型语言模型时代生存
How a new DSL may survive in the era of LLMs

原始链接: https://www.williamcotton.com/articles/how-a-new-dsl-survives-in-the-era-of-llms

成熟编程语言受益于海量训练数据和完善的工具链(如类型检查器、代码检查工具等),这些工具能有效为大语言模型(LLM)提供“基础支撑”,因此新语言面临着极高的准入门槛。为了在人工智能驱动的生态系统中保持活力,新兴语言(特别是领域特定语言,即 DSL)必须优先考虑开发者体验和人工智能代理的兼容性。 新语言的成功现在取决于三大支柱: 1. **AI 上下文:** 提供结构化、机器可读的文档(例如 `AGENTS.md` 文件),使大语言模型能够轻松学习语言的语法和语义。 2. **交互式引导:** 利用 WebAssembly(WASM)在落地页提供基于浏览器的交互式编辑器,可显著缩短新用户的价值实现时间。 3. **集成化工具:** 开发者必须提供“一站式”的诊断方案。创建一个既能作为运行时又能作为语言服务器的单一二进制文件,可确保在命令行和基于浏览器的编辑器中获得一致的反馈。 通过自动化并简化这些基础性要求,开发者能够打破当前偏向传统语言的“反馈循环”,为迎接专为智能体编程时代打造的各类专业化新语言的爆发铺平道路。

Hacker News 最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 在LLM时代,一种新的DSL如何生存 (williamcotton.com) 6 分,williamcotton 发布于 1 小时前 | 隐藏 | 过往 | 收藏 | 讨论 | 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

June 11th, 2026

There have been an untold amount of projects written in Python, Rust, Ruby, and other "legacy" software languages over the last few decades. All of this code has made for great fodder for LLMs. As these models have progressed the instances of hallucinations have decreased dramatically.

But it's not just the mere volume of source code to train on. It's the advanced tooling around these languages. Type checkers, linters, language servers, compilers, interpreters, testing harnesses, you name it. All of these tools ground software in reality and give an LLM agent immediate feedback. For example, hallucinations are caught by the type checker before the code is even run.

Because of this even more of these legacy software languages are being used to create even more content for future models to train on.

It seems like we're stuck in a feedback loop of sorts.

So what's a new language to do to become viable in the era of LLMs?

The answer isn't too dissimilar to how things used to work: great documentation, great marketing, and great tooling. How does a prospective language user find out about a new language? How do they onboard? How does the language integrate with their existing tools and workflows? A modern language is going to need a robust language server. It is going to need an extensive set of documentation with a good onboarding flow.

A new language also going to need a little bit more to play well with LLM agents.

Documentation and Context

One approach is to have your new language create an AGENTS.md type file from the binary itself, something along the lines of:

webpipe init --codex

Here's the LLM template used by Web Pipe, an experimental web application DSL that I've been working on lately.

It's a bit unfair because Web Pipe has a number of advantages that other DSLs might not have. It embeds other languages like jq, Lua, JavaScript, SQL and a few more. LLMs are already going to have familiarity with these languages so the syntax and semantics of the pipeline-oriented approach are not that much more to learn.

I've already had a lot of luck with one-shot prompts in codex to create demo applications using Web Pipe with just this single AGENTS.md template file as guidance.

Landing Pages

The quicker you can get across the purpose and use case of a new language the better. The quicker you can get someone playing with the language the better. Since it has never been easier to create WASM runtime environments for new languages you can benefit immensely from adding an interactive editor right at the top of your landing page, as is the case with another project of mine called Datafarm.

So don't just target one runtime like a CLI tool. Target a browser runtime as well!

Tooling

You're going to need great diagnostics. From compile time, to runtime, to linting, you name it, you're going to need to throw the kitchen sink at this problem. You will need a language server and you will need multiple interfaces with the underlying diagnostic tooling. And of course we've got a plethora of agentic programming tools out there to assist with this!

One pattern I've come across is to create a single binary that operates as the runtime and the language server. This keeps all of the diagnostic feedback inline between the two. In addition, separating the diagnostics from the LSP APIs means you can ship WASM diagnostic tools for a browser-embeddable component like Monaco. Red squiggles under all of your typos and syntactical errors, no matter the tool or runtime, FTW!

It's my opinion that we're going to see an explosion of new languages, especially of the DSL variety, over the next few years as it becomes easier and easier to cover the bases needed for liftoff.

联系我们 contact @ memedata.com