I often had to grep through *.services.yml to figure out whether a certain service uses periods or underscore in its id. I simply cannot remember if its config.factory or config_factory. I just realized there is a better way to reference services thanks to autowire aliases! I just use '@\Drupal\Core\Config\ConfigFactoryInterface'. And in PHP code (e.g. classes implementing ContainerInjectionInterface) I'm now using ConfigFactoryInterface::class instead of the string literal.
@znerol if you own the services, you can opt to make the service ID services private and the classs/autowire version public. So you can ensure you can access the service with Drupal::service(class-string) while preventing the access to the same service via ID. A nice workaround/hack esp for testing purposes.
@znerol Only possible since recently! But very nice indeed 😊