I haven't found any major compatibility issues with goldfish and most other relatively peaceful species of fish that are not timid. Goldfish are tolerant of tropical temperatures into the low 80s without any apparent ill effects in my experience, and I know of at least one study done with Cyprinus carpio (which are so closely related to C. auratus that the two species can interbreed) in which temperature was a variable, and in which the fish were kept in water as warm as 36*C/99*F. With that in mind, while they may be happier in cooler water, the difference between 70-75 that most unheated indoor tanks are going to be at and the 77-78 that most tropical tanks are kept at is likely inconsequential to the fish and keeping them with tropical species is not likely to pose a problem.
I wouldn't keep any long-finned variety (including comets) with something prone to fin nipping, obviously, and goldfish will eat anything that fits in their mouth that holds still long enough for them to grab it, so keeping much smaller fish (esp. with fast goldfish) is ill-advised if you care about the smaller fish. Keeping them with anything they might try to fit in their mouths that has spines (i.e. small catfish, loaches) is also probably not a good idea, for obvious reasons. I also wouldn't keep them with timid fish like say, neons, as the goldfish are likely to be too active and boisterous for more timid tankmates and will wind up stressing them out.
I think anything that can stand up for itself without being a bully or being eaten will be just fine though; in the past I've had them with male Bettas*, guppies, platies, corys and zebra danios without issue. I currently have three small comets in a 30G with two small butterfly koi, a 4" dojo loach, 3 white clouds and a clown plec that needed an emergency re-homing. The only issue I have is the occasional disappearance of white clouds, which I expected and which doesn't really bother me. I wouldn't have any concerns (aside from the appearance of the tank...) combining small (<4") comets with tiger or checkered barbs, harlequin rasboras, danios, or some of the more boisterous tetras (don't ask me which ones, I don't generally like tetras). I think that any of the more laid back schooling fish would get overrun though, and I think that something that's markedly more aggressive than goldfish-cichlids come to mind-is going to end up beating the snot out of them. And larger goldfish (or fancy species with swimming/visual impediments) should probably be kept either alone or with the fish that people typically recommend, i.e. white clouds, dojo loaches, and that's about it.
*note that Bettas + goldfish is a crapshoot at best; Bettas vary widely in temperament and while I've had a few that were OK with being dumped in with pretty much whatever, a lot of them are not this laid back and mixing them with other brightly colored fish of similar size has the potential to end with a really pissed off betta and a dead fish.