Date: Sat, 5 Jul 2025 23:03:11 +0300
On Sat, 5 Jul 2025 at 22:52, Ville Voutilainen
<ville.voutilainen_at_[hidden]> wrote:
> If you want a set of type property queries that just returns false
> when given a non-type, you can build that on top of the standard
> property queries.
> But you can't build the other-way-around alternative on top of
> standard queries that just return false for every question, even for
> arguably nonsensical
> questions.
Well, for this particular case, one could just add a
if (!is_type(info))
throw LogicError();
into the other-way-around API..
> That aspect of what is and isn't a building block settles the API
> design question for me.
..so this is a lesser concern, but I'm still gravitating towards
letting the API be as it is, instead of revamping it.
<ville.voutilainen_at_[hidden]> wrote:
> If you want a set of type property queries that just returns false
> when given a non-type, you can build that on top of the standard
> property queries.
> But you can't build the other-way-around alternative on top of
> standard queries that just return false for every question, even for
> arguably nonsensical
> questions.
Well, for this particular case, one could just add a
if (!is_type(info))
throw LogicError();
into the other-way-around API..
> That aspect of what is and isn't a building block settles the API
> design question for me.
..so this is a lesser concern, but I'm still gravitating towards
letting the API be as it is, instead of revamping it.
Received on 2025-07-05 20:03:25