[llvm-dev] [RFC] Should we add isa_or_null<>?

Don Hinton via llvm-dev llvm-dev at lists.llvm.org
Fri May 3 08:36:56 PDT 2019


Hi David:

>From my count, of the 12 people who commented, 8 were in favor of adding
`isa_and_nonnull`, while only 4 were against it.  A few of the 'yes' votes
also indicated a preference for the shorter `isa_nonnull` alternative --
this was also true of those I asked at the Social last night.  So there may
be a consensus building for a name change as well which could alleviate
some of your cognitive load concerns.

However, the only consensus I can discern from this thread is an agreement
to add `isa_and_nonnull` (or `isa_nonnull`), not that it's not worth it.

Please let me know if I missed something, thanks...
don

On Mon, Apr 29, 2019 at 2:37 AM David Chisnall via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> On 22/04/2019 15:15, Don Hinton via llvm-dev wrote:
> > Although there were a few no votes, it looks like there's a consensus
> > for adding a `isa_and_nonnull` type operator.  While there were some who
> > preferred `isa_nonnull`, it wasn't overwhelming, and since
> > `isa_and_nonnull` is already committed, I'm going to leave it as
> > `isa_and_nonnull` for the time being.
>
> Maybe I missed something, but it looked to me as if the consensus was
> that `isa_and_some_words<T>(foo)` imposed a higher cognitive load on the
> reader than `foo && isa<T>(foo)`, as well as being more to type in most
> cases, so wasn't worth adding.
>
> David
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190503/a204f57b/attachment.html>


More information about the llvm-dev mailing list