[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
Hmm, I may have it confused with the constructor syntax ( SomeClass sometobject = new SomeClass<>(); does work, no time to check the method right now, but there is no reason why it couldn't work.) I feel like listing the type again if it is already known from the variable that's being assigned is like suggesting this for a for each on a buffer: for each bufCustomer where bufCustomer.custno = 123 : ... end. Since the buffer is defined on the customer table there's now reason to list it over and over again, why would we insist on doing exactly that when we are referring to variable types? You should allow it (for when you are not storing the result of a method but directly calling a method on the result for example) but I see no reason to enforce it if the compiler can figure it out. Again, as long as it is clear and no confusion is possible, why add overhead to code. If it doesn't add anything I don't think it should be there.

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