4 ms·
While in general I agree, in this case that aspect of the problem entirely came down to "don't use object pools that span multiple requests". That's a conscious
by brundolf 6y ago
While in general I agree, in this case that aspect of the problem entirely came down to "don't use object pools that span multiple requests". That's a conscious optimization that was made and then retracted, not a subtlety that accidentally slipped in due to mutability itself.
- beders 6y agoobject pools == mutability (why else would you keep objects around in a pool)
- brundolf 6y agoObject pools require mutability; by no means does mutability require you to use object pools
- beders 6y agoObvious. But not what I meant. I meant that it was a conscious decision to use an object pool and re-use objects. That doesn't happen with immutable by default languages. Ergo, these particular kinds of bugs just don't happen.
- joebob42 6y agoI guess the point here is that an object pool isn't the default anyways: theyve chosen to do something non-default for performance, which you can still do in immutable by default languages.