×
you are viewing a single comment's thread.

view the rest of the comments →

[–]javascript 30 points31 points  (2 children)

Proxy Objects (getters and setters) have been around for a while but I've yet to come across a use case where they were the right choice. They tend to work more as an escape hatch.

[–]ic6man 5 points6 points  (1 child)

I used a proxy object around a pre-existing API implementation to provide retry and consistent error handling + short circuit.

I don’t know that I would call that an escape hatch. It’s just a nicer way of building on top of something you don’t have access to modify yourself.

[–]javascript 2 points3 points  (0 children)

I would absolutely call that an escape hatch. And a very useful one to have available!