Since services are a part of the Java module system, how do they align with the two goals of the module system--strong encapsulation and reliable configuration?
Let's begin with strong encapsulation. Services provide an alternative way of having types in modules interact with one another, which does not involve having to expose types to all consuming modules. The service provider packages do not have to be exported and thus they are encapsulated even from modules that read the module containing the service! At the same time, they are published as implementations of a service type, and thus can be used by modules that do not even read the service implementation module. So, in a way, the types are still encapsulated, although not in the same way as what we've seen so far.
How about reliable configuration? Since the service providers...