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

  • Thread starter Thread starter jankeir
  • Start date Start date
Status
Not open for further replies.
J

jankeir

Guest
Marian, generics would allow this: define variable interestingService as ISomeInterestingServiceType no-undo. assign interestingService = Ccs.Common.Application:ServiceManager:getService<>(); Compare that to the current cast stuff and tell me what you like best ;-) There are other use cases where the advantage is bigger (type safety in collection classes comes to mind) as this specific problem can mostly be overcome with a small include but still, it would be a lot cleaner if the syntax were build into the language rather than bolted on. ps.: Logic in includes: Yuck.

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