Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor instanceof #2791

Closed
davidkpiano opened this issue Nov 8, 2021 · 1 comment
Closed

Refactor instanceof #2791

davidkpiano opened this issue Nov 8, 2021 · 1 comment

Comments

@davidkpiano
Copy link
Member

Let's figure out an alternative approach than using instanceof. While it sounds a little bit silly it really can be a PITA and I know that the pain ain't mine only - I've seen Ben Lesh and Jay Phelps mentioning this stuff on Twitter once.

It's just that with complex-enough applications/monorepos it's somewhat easy to end up with multiple copies of a library - and even though the structures created by one of the copy and handed out to the other one should be compatible, they are not if we end up using instanceof. Even though the class itself in each of copy might be 100% the same the runtime can't tell that and will fail on every executableAction instanceof ExecutableAction in each such situation

Originally posted by @Andarist in #2484 (comment)

@davidkpiano
Copy link
Member Author

@Andarist Until it can be demonstrated that this is an actual problem, let's close this one out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant