FOOP references: advantages and disadvantages

Started by hartrock, August 27, 2015, 08:32:41 PM

Previous topic - Next topic

hartrock



[*] FOOP related:
 

     
[*] reuse of FOOP funcs, instead of using bloated mixed-in contexts;
 
  • [*] polymorphism;

  •   [/list]

  • [*] context related: state change transfer of FOOP from callee to caller by call parameter, without the need to share a var located somewhere outside callees func definition;

  • [*] both together: selected API funcs for direct access as part of FOOP's reference context, to have a separation of API and other code.
  • [/list]



    [*] FOOP references are polluting MAIN namespace;
  • [*] no automated garbage collection of FOOP reference contexts (but it's no problem to provide a delete method - e.g. as part of FOOPReference class, which has created them - iterating over all ref context instances easing this);

  • [*] call-by-ref has problems, which call-by-value does not have.
  • [/list]


    Convenience funcs for calling FOOPs like contexts - this is related to the previous point - can be helpful (e.g. for transparently having the same API after switching from a single context to FOOPReferences).[/list]