[PATCH] D127948: [TableGen] Add new operator !instanceof

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 14:28:39 PDT 2022


tra added a comment.

In D127948#3600082 <https://reviews.llvm.org/D127948#3600082>, @nhaehnle wrote:

> Thank you. One more thought after sleeping on it: What do you think about `!exists`? I think `!exists<T>("foo")` reads nicely as "does there exist a record of type T with name 'foo'?". It's not perfect, but I like that there's less confusion with "instanceof" or "isinstance" operators that some programming languages have.

I like it. `!instanceof` sounded like something that assumes that its input is an object, while we're actually giving it an object's name. 
`!exists` seems to be a better match.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127948/new/

https://reviews.llvm.org/D127948



More information about the llvm-commits mailing list