BiggestBulb

joined 1 year ago

I'm assuming we're talking about test mocks.

I'm quite partial to using mocks within hard-to-reach code. I was curious the other day when I saw the Primeagen saying test mocks are awful - I'm not that heated about it either way and I think if it will take an hour of dev time or a simple mock I would always prioritize using the mock.

It's not the best, but people demonize it too much in my opinion. I would say to just use them and see if they work for your use case.

I hear a lot of "just use functions / objects" but for some things (IE, game dev) classes are objectively better in my opinion (it makes more logical sense to do "objects.push(new Car())" than to do it with functions or objects in my opinion, possibly a hot take)