TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Designing a Programming Language: I

87 pointsby memorableover 2 years ago

6 comments

sshineover 2 years ago
I am always happy to see people make their own languages and write about it.<p>For this article in particular, I disagreed with the first two parts:<p>1. Premise: Simplifying assumption: There are two kinds of languages, static and dynamic. Somehow, it&#x27;s just good to know this, and nothing is said of which of these the Duck language fall into.<p>2. Syntax: Wait, no.<p>There is an implicit premise here, being that if you make a language, it&#x27;s probably going to be a general-purpose one with expectable control-flow structures, and because of that, what we care about is how those control-flow structures look, i.e. should there be curly braces around blocks and such.<p>A premise I would prefer is: When you make a language, you want to solve a problem. Imagine a language being an overgrown library. You don&#x27;t start a tutorial in making libraries about how a good library interface looks like. You start by saying what problem you want to solve.<p>Another premise I would prefer is: Most problems are domain-specific, so most language-shaped solutions to problems are DSLs.
评论 #33356915 未加载
评论 #33359301 未加载
评论 #33359129 未加载
评论 #33358540 未加载
thomover 2 years ago
It&#x27;s not in the bibliography at the bottom, so I thought I&#x27;d give a shout out to Crafting Interpreters, which is a very accessible tome on language design and development:<p><a href="https:&#x2F;&#x2F;craftinginterpreters.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;craftinginterpreters.com&#x2F;</a>
nudpiedoover 2 years ago
Yet another compiler how-to which pretends to be a design. There is no usage design as such, not a word on semantics, even the work &quot;semantic&quot; is not mentioned in the whole text.<p>The only design here might be the verbatim copy of a compiler architecture which is explained over and over. And some people might call architecture &quot;design&quot; and &quot;programming language&quot; a syntax compiler.<p>&lt;&#x2F;rant&gt;
评论 #33359590 未加载
ModernMechover 2 years ago
There are lots of resources out there about making a parser and interpreter and calling that a “language”. While those two components are necessary, alone they don’t seem sufficient in 2022 to call something a programming language; the scope of what a language is has expanded to include the ecosystem and community, which are often aspects cited these days for using or not using many languages.<p>Question: does anyone know of resources that discuss the <i>rest</i> of programming language design?<p>- designing a standard library<p>- building tooling like debuggers and package managers<p>- interfacing with other languages<p>- managing and growing a community<p>- evolving the language over time as it grows<p>- integrating with IDEs and building language server support<p>- how to communicate the language to others so they understand the value proposition.<p>- how to choose the right set of features to support. How to discern a good set from a bad set, how to make the language stand out and unique.<p>- also maybe issues of how to stay motivated and focused. It takes years to build a language, how does one stay committed to it over that time?<p>I understand why there might not be many resources that cover these angles, as not many language projects get past the parser stage, but I’m still curious what others have found.
评论 #33357785 未加载
评论 #33357908 未加载
phoe-krkover 2 years ago
After reading the title I thought that this would be an article about a programming language <i>named</i> I, in the style of B, C, D, J, K, et cetera. &quot;Part I&quot; would be much clearer.
评论 #33356198 未加载
Existenceblinksover 2 years ago
I can open the `https` link above on firefox. Have to open:<p><a href="http:&#x2F;&#x2F;ducklang.org&#x2F;designing-a-programming-language-i" rel="nofollow">http:&#x2F;&#x2F;ducklang.org&#x2F;designing-a-programming-language-i</a>
评论 #33355035 未加载
评论 #33355281 未加载
评论 #33357428 未加载
评论 #33360899 未加载
评论 #33357183 未加载