tterrag1098

Untitled

Jun 12th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. @LexManos sorry for ping, but I've realized I left out the inverse statements of #2 and #3. are those also true? i.e. "if getCap() is null then hasCap() must be false" and same for nonnull/true
  2. I'm assuming yes, but I want to be clear
  3. LexManos - Today at 7:40 PM
  4. Undefined
  5. i dont see of any case where it would matter
  6. tterrag - Today at 7:40 PM
  7. well it matters due to your answer to #1
  8. LexManos - Today at 7:40 PM
  9. How so?
  10. tterrag - Today at 7:40 PM
  11. if I skip hasCap, and assume that a nonnull return from getCap means it supports the capability, doesn't that skip a check?
  12. if getCap() is not contractually bound to hasCap()
  13. then I cannot rely on getCap()!=null as meaning the cap is supported
  14. LexManos - Today at 7:41 PM
  15. does it matter if has says it doesnt support it if it decided to give you it in the first place?
  16. tterrag - Today at 7:42 PM
  17. doesn't it? I'm kind of asking you that :stuck_out_tongue:
  18. LexManos - Today at 7:42 PM
  19. The point of has is to be performant when it comes to users who dont care about the actual cap
  20. tterrag - Today at 7:42 PM
  21. should hasCap be respected always?
  22. or is it safe to ignore conflicting returns
  23. LexManos - Today at 7:43 PM
  24. ignore conflicting returns?
  25. dunno
  26. I cant think of any lofical place where get != null and has != true
Advertisement
Add Comment
Please, Sign In to add comment