Login
You're viewing the gulp.cafe public feed.
  • Aug 22, 2026, 7:42 PM

    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.

    💬 0🔄 2⭐ 16