[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: why does IServiceManager:getService not return IService instead of P.L.Object

  • Thread starter Thread starter bronco
  • Start date Start date
Status
Not open for further replies.
B

bronco

Guest
getService ('myService') is pointless since we already have casting. (although imho the CAST function looks ugly). assign interestingService = Ccs.Common.Application:ServiceManager:getService<>(). is no good as well, since that throws away the concept of Strong Typing (if getService returns a P.L.O. you want the compiler to tell you that you're mixing up the types, that's the whole point of Strong Typing). The other way around would be nice and is called Type Inference. This would mean something like: def var myService = serviceManager:GetService('logservice'). Now if the GetService method returns an IService type, the myService var would be automatically of the type IService.

Continue reading...
 
Status
Not open for further replies.
Back
Top