# AIが書いたUIの誤りをコンパイラが暴く、新言語「Declare」

Original title: Declare is a UI language for you and your AI

> Hacker News story 50622854 · language: ja · submitted 2026-11-24
> Web version: https://zeli.app/ja/story/50622854
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 102 · by [ilamont](<https://news.ycombinator.com/user?id=ilamont>) · 💬 86
[original](<https://davidtemkin.github.io/declarelang/>) · [HN discussion](<https://news.ycombinator.com/item?id=50622854>)

## Summary

Declareは、レイアウトやモーション、状態、描画を言語そのものに組み込んだUI記述言語。カレンダーやデスクトップ、100万件の課題を扱うトラッカーまで、すべてコンパイラが検証可能な単一プログラムとして書ける。AIエージェント向けに、エラー箇所と正しい書き方を示す診断や実行中の値を説明するInspector、構文解析から描画までの6段階の検証を用意。同じ指示でチケット購入アプリを作らせたところ、Declareは1,279行で初回から11個の隠しテストを全通過、Reactは2,666行で6個だった。

## Key quote

> あなたのAIはコードを書ける。だが、それが間違っていると分かるだろうか？Declareなら、分かる。

## HN discussion (86 comments)

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

> UIを記述するという点で、Qt/QMLは本当に自分にとってベストな選択肢に達したと思う（構文エラーがあったら無視して。記憶から書いてるから）。
>
> 例えば、これを比べてみてほしい：
>
> \`\`\`
>
> Window {
>
> textColor: "slategray"
>
> property int v: 40
>
> ColumnLayout {
>
> id: layout
>
> anchors.fill: parent
>
> spacing: 20
>
> Text {
>
> id: number
>
> Layout.alignment: Qt.AlignHCenter
>
> font.pixelSize: 70
>
> text: v
>
> }
>
> ProgressBar {
>
> id: progressBar
>
> Layout.alignment: Qt.AlignHCenter
>
> value: v/100
>
> color: v < 50 ? "dodgerblue" : "turquoise"
>
> }
>
> }
>
> MouseArea {
>
> anchors.fill: parent
>
> onClick: v = (v+20)%100
>
> }
>
> }
>
> \`\`\`
>
> これをDeclareと比べると：
>
> \`\`\`
>
> App [ textColor = slategray,
>
> group: View [ x = center, y = center, width = 80%,
>
> layout: SimpleLayout [ axis = y, spacing = 20 ],
>
> number: Text [ width = 100%, textAlign = center,
>
> fontSize = 70, fontWeight = bold, text = { "" + v } ],
>
> bar: Gauge [ width = 100%, value = { v },
>
> tint = { v < 50 ? cool : warm }, accessibilityLabel = "v" ],
>
> hint: Text [ width = 100%, textAlign = center,
>
> text = "click anywhere to change v" ]
>
> ],
>
> v: number = 40,
>
> cool: Color = dodgerblue,
>
> warm: Color = turquoise,
>
> onClick() { v = (v + 20) % 100 }
>
> ]
>
> \`\`\`

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

> LLMっぽい言葉遣いがかなり気持ち悪い：「Say what you mean. Exactly」とか、コードコメントで「// One value, v, and three things that follow it」とか。すごくひどい書き方だ。

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

> ここはしばらくするとClaudeっぽさが読みづらくなってきた。プロジェクトの主張は人間が書くべきだ。面白いアイデアに見えるだけに残念。

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

> 最初に触れるマーケティングページとコアなドキュメントは人間が書くべきだ。面白そうに聞こえたけど、AIの匂いを感じた瞬間に目が滑った…

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

> これはなかなかよくできているように見える。ただ、ウェブサイトにマーケティング調の文章（おそらくAI生成）が多すぎて、これ以上読みたくないなと思い、試すのをためらっている。
>
> 最初に、これがnpmパッケージであり、そのためのツール群も含まれていて、出力はブラウザで動くということを言うべきだろう。

---

## Cite

- Page: https://zeli.app/ja/story/50622854
- Date: 2026-11-24
- Source: davidtemkin.github.io (https://davidtemkin.github.io/declarelang/)
- Hacker News: https://news.ycombinator.com/item?id=50622854

## Other languages

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