I agree that to a certain point, APIs can and should be extended. However, the thing that I think is the argument here is that the way we can currently do this isn’t much more complicated (
node.constructor.name === type). Also, this functionality (in pretty much this exact form) can be easily achieved by a simple external library (although I also plan on releasing the SelectionChecker, I was actually talking about something much smaller and more lightweight without so many “complex” functions).
The thing that I think we should be careful about is at what point we get to oversimplifying things. I can agree that something like this could be useful, but the question is at what point we draw the line of “oversimplifying”. Personally, I don’t have a problem with the APIs extending (since it really doesn’t affect me). However, I really enjoyed that they are as lightweight and to the point as they are, making it easy for me to get into plugin development.
I really have nothing against this request in particular, but whenever it is easy to implement a similar system or use a library for it, I think it is important to check if it’s really needed or just “abstraction for the sake of abstraction”. I actually think that some sort of “standard library”, which could be open-source and include all such things (maybe also things like my storage helper, the object utilities and other things like that) could be useful, since I think such things are more of an extension to APIs than they are a “real” part of the APIs.
Personally, I feel like this already passes this line of “oversimplifying” (since it isn’t complicated to do it manually), and think abstraction should only be done to break down complex things (like e.g., math around matrices in transformations). However, this really is an opinionated question (where this really fine line of useful or oversimplifying is) and I absolutely understand your point of view as well – but especially because of this, I feel like this is a question (not just this request, but really the question in general), where we can only get to good solutions by seeing who prefers what (not only @Velara and me, but also everyone else), since as much as we could argue for our points, I really think there is no right or wrong here – we both draw the line of what is still useful at different locations, and that’s alright and it is pretty much up to Adobe to decide which way to go .