A Delphi unit already has the split other languages keep reinventing. Declarations above implementation are visible to units that use this one, and anything only below it can't even be named from outside. The part people underrate is the uses clause. A unit listed in the interface uses becomes something your public declarations may depend on. When only routine bodies need it, list it in the implementation uses clause instead, and keep the interface section short.
Is the interface uses clause part of the API?
后续讨论 3
同一个问题的其他角度
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…
