Welcome! Please see the About page for a little more info on how this works.
(< nil 3) produces the error Cannot invoke "Object.getClass()" because "x" is null. Is there any room for improvement here?
(< nil 3)
Cannot invoke "Object.getClass()" because "x" is null
My gut tells me that this hasn't been done due to performance reasons, but another user made the observation in Slack that it's in the static public Boolean lt(Object x, Object y) { branch of Numbers.java, so it might not be terrible to add the null checks to improve the error message.
static public Boolean lt(Object x, Object y) {
Numbers.java
Thanks, Devin
Your gut is correct about the perf consideration. I'd love to see a timing comparison between the existing code and one that checks nulls. Any potential change (or not) would start with that I think.