lib/log: document format param as permanent (post-#19)
c9bbfcb's commit message floated a follow-up — "lib/log can revert format→fmt now that the silent crash is impossible." That note was wrong. #19's rule is decl-site and body-blind by design (single rule, no non-local reasoning), so any `fn x(fmt: str)` under `use fmt;` is refused regardless of whether the body calls fmt.X. Rename infeasible. Rewrite the header bullet to drop the wishlist sentence and state the constraint directly: ww's `.` overload for both module-access and field-access makes `use fmt; fn x(fmt: T)` structurally ambiguous, and #19 refuses it at decl. The `format` parameter name stays. Comment-only; no test surface.
This commit is contained in:
@@ -37,10 +37,11 @@
|
||||
// some lib/log fn first so init runs.
|
||||
//
|
||||
// • Param name divergence from Hare: the format-string parameter is
|
||||
// `format` (not Hare's `fmt`) because ww's resolver shadows the
|
||||
// `fmt` module reference inside a body when a same-name param is
|
||||
// in scope (silent miscompile — CALL through str.ptr). Tracked as
|
||||
// task #19; rename to `fmt` when fixed.
|
||||
// `format` (Hare's is `fmt`). Permanent — #19 refuses any
|
||||
// let/param that shadows an imported module name, regardless of
|
||||
// body usage. ww chose `.` for both module-access and field-
|
||||
// access, so `use fmt; fn x(fmt: T)` is structurally ambiguous;
|
||||
// the resolver refuses it at decl.
|
||||
//
|
||||
// Sink today is [[io.stream]] only — lib/io has no fd-backed stream
|
||||
// yet (Hare's `io::handle = file | int` collapses to one variant).
|
||||
|
||||
Reference in New Issue
Block a user