Discussion about this post

User's avatar
Mark Young's avatar

Just found your channel today, and I've liked all your posts -- including this one. (I didn't click the like button on every one, tho', so I also /haven't/ liked all of them. No contradiction there.)

I actually use the example of a Car when I talk in class about reference and co-reference -- the one car that belongs to both my wife and me, and a separate car with the same make, model, year and colour owned by my neighbour Jennifer down the street. Even picked the same six properties, and used Q4 for the .equals method. And I relate it to the polysemous question "Do I have the same car as her?" to motivate the distinction between == and .equals.

So I'm quite taken with your articles. But I'm not sure your strategy for resolving paradoxes works. Consider Russell's paradox. If I create a Set of Object in Java, I can add itself to itself:

Set<Object> theSet = new HashSet<>();

System.out.println(containsItself(theSet)); // prints "false"

theSet.add(theSet);

System.out.println(containsItself(theSet)); // prints "true"

I can use a foreach loop (or .stream().anyMatch(...)) in the method to find if a set contains itself:

public static boolean containsItself(Set<Object> givenSet) {

for (Object anElement : givenSet) {

if (anElement == givenSet) {

return true;

}

}

return false;

}

There is only one object involved here -- the HashSet instance that theSet, givenSet and anElement all refer to. There is no "carbon copy" of the set; there is no distinct "version" of the set inside the set. The == operator determines that givenSet and anElement are referencing the same object -- pointing at the same hunk of memory. It doesn't even look at the HashSet's properties. It doesn't dereference the variables.

The code needs two variables so that the programmer can specify the two roles it needs to play (content and container), but neither /variable/ contains an object. Each variable contains a /reference/ to the object -- a way of talking about (or to) that object. If my wife gets her car painted green, then my car will be green (her car == my car), but Jennifer's car will still be red (my car != her car). If I add my car to theSet (i.e. the object I'm talking about when I use that variable), then the set that theSet contains will also contain my car, because it's the object that contains (and is contained), not the variable.

So the metaphysics of Java allows a set to contain itself -- not just a copy of itself. Which suggests that your method for resolving paradoxes doesn't apply in that metaphysics.

An even simpler example, without the content/container distinction:

public class SelfReferencer {

public final SelfReferencer me = this;

}

Expand full comment
James “JJ” Cantrell's avatar

Thanks for sharing, Stan. You know I always enjoy your thoughts.

Expand full comment
2 more comments...

No posts