I've seen two of connectedness of categorical flavour which I present below:
(Maps into two point set): A topological space $X$ is connected iff the only continous functions $f:X \to \{ 0,1 \}$ are the constant functions *
(Intermediate value property of maps into $\mathbb{R}$): A topological space is connected iff every continous function $f:X \to \mathbb{R}$ has the intermediate value property *
These are quite nice because they show that to understand connectedness, which is an internal property of the space, it suffices to study the behaviour of maps from that space into some other space. In short, it shows that a certain internal property of the space is stored in maps from the space.
In undergraduate topology, another concept that's introduced around the same time connectedness is and also starts with a "c" is compactness. Now, I know there are many types of compactness, which luckily turn out to be the same metric spaces. The many equivalent versions can be found on wiki.
However, I've never heard of a categorical formulation of compactness and couldn't find much on it by googling. I found this MO question discusses a possible umformulation. But, the final conclusion was that the one provided by the asker wouldn't suffice.
I want to ask, does there exist a simple categorical description of open cover compactness? If not, why is it difficult to give a simple description of compactness in terms of maps of a given space to some other fixed one like we do with connectedness?