Join Nostr
2026-08-22 19:42:45 UTC

Tom Forsyth on Nostr: Thinking about zero-cost abstractions. Thinking about how I found a bit of C# code ...

Thinking about zero-cost abstractions.

Thinking about how I found a bit of C# code that did:

array = new_item + array;

...and realising a few things:

1. Knowing this is bad is instinctive. Didn't even need to think about it.

2. The person who wrote this has no idea why this is worse than "array = array+ new_item"

3. Nothing in the language would guide them towards this knowledge.

4. This is probably rampant in all the other bits of code I don't see.

5. Zero-cost abstractions never are.