logoalt Hacker News

addaontoday at 5:52 PM1 replyview on HN

"If something requires attention, it’s by definition relevant"

Not really. Consider an assembly language for a processor with a very orthogonal register set. The number of registers used by a block of code is relevant, but the identity of those registers isn't. That is, if the code can be written without spilling with six distinct, uniform registers, the choice of one of the 6! possible assignments of those six registers are irrelevant. But when writing that code, you still need to make the choice. And in real assembly languages, it's not necessarily obvious whether the choice here is arbitrary and unconstrained, or externally constrained (e.g. when choosing a mapping that avoids a move instruction by forcing the caller to pass a certain value in an agreed register; or when using an almost-orthogonal register set where it's unclear if later code cares that the value is left in a register that is also the possible target of a div instruction or something), so this requires attention at both write-time and read-time, even when irrelevant.


Replies

gwerbintoday at 5:59 PM

And if I'm writing a script to query the Google Maps API then I really don't want to have to think about registers at all.

Maybe "high-level"" low level" should be understood in terms relative to the task and its goals.

show 1 reply