TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Little Languages (1986) [pdf]

175 点作者 ashish0110 个月前

9 条评论

ashton31410 个月前
We are absolutely swimming in little languages. Consider these languages:<p>- The language of regular expressions<p>- SQL queries<p>- In web frameworks, the language of routes<p>- etc.<p>Unfortunately we embed a lot of these languages as strings. This is problematic because the language usually sees just opaque strings—we can&#x27;t apply any of our lovely static analysis tools to these little embedded languages.<p>I&#x27;m doing some research in this area. We just got a paper published at ECOOP. The big idea is that, with a little bit of clever metaprogramming, we can help the type checker understand these little languages better and give us more helpful hints or execute more efficiently. This isn&#x27;t a new idea, but no one has given it a name before. Here&#x27;s the blog post version: <a href="https:&#x2F;&#x2F;lambdaland.org&#x2F;posts&#x2F;2024-07-15_type_tailoring&#x2F;" rel="nofollow">https:&#x2F;&#x2F;lambdaland.org&#x2F;posts&#x2F;2024-07-15_type_tailoring&#x2F;</a><p>(HN discussion): <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=40990232">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=40990232</a>
评论 #40991328 未加载
评论 #40991279 未加载
评论 #40992566 未加载
AstroJetson10 个月前
I loved his articles in the ACM. They are collected in a book called Programming Pearls (<a href="https:&#x2F;&#x2F;www.amazon.com&#x2F;Programming-Pearls-2nd-Jon-Bentley&#x2F;dp&#x2F;0201657880&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.amazon.com&#x2F;Programming-Pearls-2nd-Jon-Bentley&#x2F;dp...</a>) I also liked his second book More:Programming Pearls (<a href="https:&#x2F;&#x2F;www.amazon.com&#x2F;More-Programming-Pearls-Confessions-Coder&#x2F;dp&#x2F;0201118890&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.amazon.com&#x2F;More-Programming-Pearls-Confessions-C...</a>)<p>Some of the same articles, but with updates and added reader comments.<p>(I posted Amazon, but there is a ton on the used market)
评论 #40990997 未加载
dang10 个月前
Related:<p><i>“Little Languages” by Jon Bentley (1986) [pdf]</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17881705">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17881705</a> - Aug 2018 (17 comments)
posix_monad10 个月前
Building a language is too hard.<p>You need to create:<p>- Grammar, parser, compiler, interpreter (delete as appropriate)<p>- Editor plugins for nice syntax highlighting<p>- Language server<p>- Packages for common things<p>- Nice website (or no one will use it)<p>- etc...<p>So the pressure is always to shoe-horn a big existing language into you problem. Maybe you can build a nice library if your language has decent syntax (or little to no syntax). If you have an AST representation, you probably dump it to JSON etc.<p>I am curious if any projects are trying to make this easier.
评论 #40997895 未加载
评论 #40999082 未加载
评论 #41029756 未加载
LangChinBob10 个月前
A brilliant read for anyone interested is &#x27;Constructing Language Processors for Little Languages&#x27;.
davidw10 个月前
Tcl was, or is, a nice way to add a language that&#x27;s very flexible and customizable to a larger system. It&#x27;s pretty easy to create your own DSL&#x27;s with it.
swatson74110 个月前
It&#x27;s not mentioned in the article for obvious reasons but, html + css + javascript = modern web browsers
rramadass10 个月前
See also the book <i>Constructing Language Processors for Little Languages</i> by Randy Kaplan.
评论 #40995190 未加载
blirio10 个月前
My favorite little language is jq.<p>It&#x27;s like SQL &lt;-&gt; RelationDB and jq &lt;-&gt; NonRelationalDB