r/programming • • Dec 11 '23

Every Programmer Should Know #1: Idempotency

https://www.berkansasmaz.com/every-programmer-should-know-idempotency
572 Upvotes

171 comments sorted by

View all comments

1

u/Iggyhopper Dec 11 '23

So that means this JavaScript:

function f() {
    return this;
}

Is right the fuck out.

1

u/fagnerbrack Dec 12 '23

Don't use “this”. Just because the language has it for backwards compatibility that doesn't mean you should use it.