Glean 拾遗
Daily · timeline

A few picks a day.

Wed, Sep 23, 2026 3picks
← 09-22
Calendar ▾
2026 · 09
MoTuWeThFrSaSu ·123456789101112131415161718192021222324252627282930
has picks today
06:00

What Color is Your Function?

函数着色:async 如何把语言劈成两半

Using an invented language where every function is either red or blue, the author shows what function coloring really means: red functions are asynchronous. Red can only be called from red, calls need special syntax, and some core library functions are red-only. The root cause is async IO: you must unwind the entire C callstack back to the event loop, so callbacks, promises, async-await and generators all end up manually reifying the callstack on the heap via a CPS transform. Async-await fixes rule four but not the split: sync functions return values, async ones return Future/Task wrappers that still need awaiting. Go, Lua and Ruby avoid coloring entirely by suspending whole goroutines, coroutines or fibers instead of returning. C# escapes the same way by using threads. Java, notably, never had the problem.

journal.stuffwithstuff.com · 20 min · Concurrency · Essay · JavaScript · Programming Languages
06:00

The Value of Things: Utility, Meaning, and Generative AI

效率的滑块:AI 造得出有用之物,造不出意义

Programming language designer Bob Nystrom separates value into utility — what a thing does — and meaning, which he argues comes from spending irreplaceable time in service of someone else and is not transferable. Generative AI sharply raises utility but cannot generate meaning: a ChatGPT-assisted screenplay written in a tenth of the time would carry a tenth of the meaning for his brother. He proposes a rough model in which efficiency is a slider setting the ratio of utility to meaning, and offers a heuristic — use AI freely for utilitarian work (he quotes a Washington Department of Ecology listing that endorses AI for boilerplate, test generation, and safe refactoring), but keep the machine out of work meant to carry human connection. He flags the model's limits: arbitrary hardship does not scale meaning, and the process itself can be joyful. Scope is deliberately limited to one person's individual use, setting aside AI's global effects.

journal.stuffwithstuff.com · 16 min · AI · Critical Thinking · Essay · Software Engineering
06:00

Long Names Are Long

标识符过长也是病:四个删词规则砍掉名字里的水分

Working on Dart at Google, Bob Nystrom sits on the second layer of code review: the "readability" pass that checks style, idioms and documentation rather than behavior. What he sees there is identifiers that are far too long. Names can be too short, but the pendulum has swung — names over 60 characters dwarf the operations performed on them, force line breaks, and push authors toward nested expressions instead of locals. His four guidelines: drop words the type already implies (nameString → name, holidayDateList → holidays); drop words that don't disambiguate, tested by asking whether the name still means the same thing without them; drop words the surrounding class or method already supplies (AnnualHolidaySale.promote, not promoteHolidaySale); and drop filler like manager, data, state or engine. A deliberately awful waffle example is trimmed step by step from DeliciousBelgianWaffleObject down to Waffle.garnish.

journal.stuffwithstuff.com · 9 min · Code · Code Review · Programming Languages · Software Engineering