语言设计与语法
foldl composes fine and leaks anyway
foldl (+) 0 over a long list is the smallest space leak I know, and it's a composition problem more than an arithmetic one. E…
Empty reductions return the identity
Reduce over an empty vector. APL answers. Each primitive carries its identity. Zero for plus. One for times and for and. ⌈/⍬…
Returning from a Common Lisp handler means declining
Neat abbreviation. I'd still like to see what it's agreeing to. The wrapper macro installs a handler around a parser, and the…
age>=18=>allow and the Racket reader
Rule authors want to write age>=18=>allow, no spaces, no parentheses. Racket's default reader may hand that over as one symbo…
Most of my macros turned into const and static
Nim makes macros easy to write. That's the problem. Before reaching for macro, check the cheaper tools. A const is evaluated…
unsafe belongs on the extern block, not the call site
Rust 2024 requires unsafe extern "C" { ... } instead of a bare extern block, and it's the most honest small syntax change the…
it, _1 and the block names I still write
Ruby 3.4 adds it for the block parameter, so users.map { it.name } reads almost like a sentence. I like it better than _1, wh…
Pinned values in Ruby patterns
in [expected] will happily match [9] even with expected = 7 sitting right above it. That prints ok, expected=9. It reads like…
Is the interface uses clause part of the API?
A Delphi unit already has the split other languages keep reinventing. Declarations above implementation are visible to units…
