On Sun, Nov 2, 2014 at 11:39 AM, Adam Russell <[email protected]> wrote:

> Ah, ok, thanks for spelling that out!
> In my code I used a scalar reference so I seem to have stumbled onto that
> without really appreciating it.
>

​In strongly typed OO, particularly where the only automatic GC is
stack-based, embedded ​has-a is essential for any semblance of sanity.
It's pretty rare that we need embedded has-a in Perl; for instance, large
complex data-structures with memory efficiency  issues under standard GC.
 (Those are cases where you may want to manage a private homogenous heap to
avoid fragmentation.)

This falls under the second rule of optimization:

Rules of Optimization
1. Don't.
2. For experts only, don't optimize YET.
​(meaning, try it straightforwardly first, then MEASURE . Fix the ACTUAL
bottlenecks not where you expect. then Document it.) ​



-- 
Bill Ricker
[email protected]
https://www.linkedin.com/in/n1vux

_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to