As distance command takes relative positioning, it is not possible to quickly calculate distance between 2 absolute points. There is also no dedicated command to do so either.
distanceASL would expected to take 2 arrays: [posASL] distanceASL [posASL]
and return euclidean distance between them. Because of very simple nature it is expected to be extremely fast.
I don't think it is necessary to slow it down and complicate it by making it to accept objects as well, since normal distance command can do this already.