🌘 如何原型化一種令人愉悅的程式語言?
➤ 追求「軟體Hygge」的程式語言原型化之路
https://kevinlynagh.com/newsletter/2025_06_03_prototyping_a_language/
作者分享了其開發名為codeCAD的程式語言的原型化歷程。儘管已完成語法、解析器、函數定義等基礎工作,但目前產出的示範程式都缺乏吸引力。作者追求的是一種“軟體hygge”——快速啟動、穩定運行且使用起來舒適的體驗,而非炫目的功能。文章探討了在原型階段如何平衡功能實現與使用者體驗,以及在實現雙向編輯功能時遇到的技術挑戰,並分享了在尋找相關資源的過程中對語言設計的思考。
+ 這篇文章讓我想到程式語言的設計不只是技術問題,更是關於如何創造一種與使用者互動的情感連結。
+ 作者對於原型開發的思考非常實用,在開發過程中要找到一個好的平衡點,避免過度投入不必要的細節。
#程式語言設計 #原型開發 #使用者體驗
How do you prototype a nice language?

🌘 存取控制語法
➤ 探索程式語言中存取控制語法的設計選項
https://journal.stuffwithstuff.com/2025/05/26/access-control-syntax/
這篇文章探討了在作者自製的腳本語言中,如何設計存取控制的語法,決定哪些宣告為公開,哪些為私有。作者分析了多種常見語言 (Java, C++, Python, Go, Dart) 的做法,包括使用修飾詞、修飾詞區塊、以及在名稱中加入特殊字元等方式,並比較了各自的優缺點,最終希望為自己的語言找到最適合的解決方案。
+ 這篇文章深入探討了程式語言設計中一個看似簡單,實則複雜的問題。作者的分析非常細緻,對各種語言的設計理念都有深入的理解。
+ 我之前一直覺得存取控制是理所當然的,沒想到背後還有這麼多考量。這篇文章讓我對程式語言的設計有了更深的認識。
#程式語言設計
Access Control Syntax – journal.stuffwithstuff.com

🌕 專為我打造的程式語言 | 卡爾·齊林斯基
➤ 從C語言實戰經驗提煉的現代系統程式設計方案
https://zylinski.se/posts/a-programming-language-for-me/
本文詳述Odin程式語言如何內建作者Karl Zylinski在C語言實務中最重視的設計理念,透過自訂記憶體分配器、暫存分配器框架、追蹤洩漏機制等核心功能,實現更安全高效的系統級編程。
+ 「終於有語言把記憶體管理的痛點都解決了,自動零初始化根本防呆神器!」
+ 「#soa語法簡化快取優化這點很實用,但切換資料結構慣例可能需要適應期。」
#程式語言設計
Odin: A programming language made for me

In my book Understanding the Odin Programming Language I wrote that “Odin incorporates some of my favorite C best practices, straight into the language”. But I didn’t really elaborate on the details. Let’s do that here! This brings me to talking a bit about a previous job I had. Back in 2021 I worked at a place called Our Machinery. We were creating a whole game engine in plain C. We used a very comfortable and powerful way to program C.

🌘 Sorbet 類型語法的過去、現在與未來
➤ 從 Stripe 內部需求看 Ruby 靜態類型演進之路
https://blog.jez.io/history-of-sorbet-syntax/
Stripe 工程團隊因應程式碼規模擴張需求,自 2017 年起開發 Sorbet 靜態類型檢查工具。面對 Ruby 動態特性限制,團隊選擇 DSL 語法設計,在運行時類型檢查與開發者體驗間取得平衡。
+ 「終於看到有人正視類型系統的語義重要性,語法只是工具,核心在於能否有效捕捉程式邏輯!」
+ 「作為 Ruby 開發者還是期待更優雅的類型註解方式,希望未來能借鏡 Python 的 Type Hints 設計。」
#程式語言設計
Past, Present, and Future of Sorbet Type Syntax – Jake Zimmerman

A discussion of how Sorbet's type syntax came to be, the problems it solves, and how it could improve.

🌖 程式語言應內建樹狀結構遍歷的基本功能
➤ 革新程式語言迴圈結構以適應非線性資料處理
https://blog.tylerglaiel.com/p/programming-languages-should-have
本文探討程式語言缺乏樹狀結構遍歷的標準語法,提出「for_tree」控制結構概念,主張其能簡化遞迴操作並減少錯誤,同時支援即時中止分支與堆疊回溯功能。
+ 終於有人指出這個痛點!手寫遞迴每次都要擔心堆疊溢位,這語法能大幅提升開發效率。
+ 但廣度優先搜索(BFS)的實作複雜度似乎被忽略了,這種語法真能涵蓋所有樹狀操作需求嗎?
#程式語言設計
Programming languages should have a tree traversal primitive

There should be a control flow construct in programming languages that can handle tree-like traversal in a nice way, similar to how for/foreach loops can handle linear traversal.

Tyler Glaiel's Blog
🌘 關於 Hindley-Milner 型推斷的冒險介紹
➤ 介紹 Hindley-Milner 型推斷及其在程式語言設計中的角色
https://reasonableapproximation.net/2019/05/05/hindley-milner.html
作者以維基百科為主要來源,勉強介紹了Hindley-Milner型推斷,討論了其在程式語言設計中的應用及其與表達力和可讀性之間的權衡。
+ 這篇文章對於想深入瞭解Hindley-Milner型推斷的人來說是一個不錯的入門閱讀。
+ 作者很坦率地分享了自己的學習過程,讓人覺得更親近和真實。
#程式語言設計 #型推斷
A reckless introduction to Hindley-Milner type inference

🌘 設計一個程式語言來速通《程序員之歌》
➤ 用於解決和撰寫謎題的程式語言「Noulith」是否也是速通《程序員之歌》的最佳選擇?
https://blog.vero.site/post/noulith
作者設計並實現了一個名為Noulith的程式語言,主要用於解決和撰寫謎題,但後來發現這個程式語言非常適合玩《程序員之歌》。他解釋了設計語言的思維過程、特點和實現細節。
+ 這篇文章解釋了作者的想法和編程語言的設計過程,很有趣。
+ 這個編程語言似乎很有趣,能否在實際中應用呢?
#程式語言設計
Designing a Programming Language to Speedrun Advent of Code

“shouldn’t this have been published a few months ago?” yeah, probably. I even considered submitting it to the AoC contest. time is a real beast. The title is clickbait. I did not design and implement a programming language for the sole or even primary purpose of leaderboarding on Advent of Code. It just turned out that the programming language I was working on fit the task remarkably well. I can’t name just a single reason I started work on my language, Noulith, back in July 2022, but I think the biggest one was even more absurdly niche: I solve and write a lot of puzzlehunts, and I wanted a better programming language to use to search word lists for words satisfying unusual constraints, such as, “Find all ten-letter words that contain each of the letters A, B, and C exactly once and that have the ninth letter K.”1 I have a folder of ten-line scripts of this kind, mostly Python, and I thought there was surely a better way to do this. Not necessarily faster — there is obviously no way I could save time on net by optimizing this process. But, for example, I wanted to be able to easily share these programs such that others could run them. I had a positive experience in this with my slightly older golflang Paradoc, which I had compiled into a WASM blob and put online and, just once, experienced the convenience of sharing a short text processing program through a link. (Puzzle: what does this program do?) I also wanted to write and run these programs while booted into a different operating system, using a different computer, or just on my phone. As I worked on it, I kept accumulating reasons to keep going. There were other contexts where I wanted to quickly code a combinatorial brute force that was annoying to write in other languages; a glib phrasing is that I wanted access to Haskell’s list monad in a sloppier language. I also wanted an excuse to read Crafting Interpreters more thoroughly. But sometimes I think the best characterization for what developing the language “felt like” was that I had been possessed by a supernatural creature — say, the dragon from the Dragon Book. I spent every spare minute thinking about language features and next implementation steps, because I had to. The first “real program” I wrote in Noulith was to brute force constructions for The Cube, for last year’s Galactic Puzzle Hunt in early August, and it worked unexpectedly well. I wrote a for loop with a 53-clause iteratee and the interpreter executed it smoothly. Eventually I realized that the language could expand into other niches in my life where I wanted a scripting language. For example, I did a few Cryptopals challenges in them. It would take a month or two before it dawned on me that the same compulsion that drove me to create this language would drive me to do Advent of Code in it. That’s just how it has to be. This post details my thought process behind the design of this language. Some preliminary notes:

🌘 靜態語言為何受到複雜性困擾
➤ 靜態語言和動態語言的差異
https://hirrolot.github.io/posts/why-static-languages-suffer-from-complexity.html
程式語言設計社羣致力於使語言更具表達性,主要是為了增加最終軟體中的代碼重用性,然而,語言越具表達性,重用性就越容易滲透到語言本身。這就是所謂的靜態-動態雙重性:當你在語言中引入新的語言抽象時,它可能只存在於靜態層面、動態層面或兩個層面上。在前兩種情況下,抽象只存在於特定層面上,會引入語言的不一致性;在後一種情況下,則不可避免地引入了雙重性特徵。
+ 這篇文章很好地解釋了為什麼靜態語言會受到複雜性困擾,並提供了一些例子來支持觀點。
+ 靜態語言和動態語言之間的差異確實很有趣,這篇文章對此進行了很好的解釋。
#程式語言設計 #靜態語言 #動態語言
Why Static Languages Suffer From Complexity