Hacker News new | ask | show | jobs
by needusername 4189 days ago
Yes it is. That's why explicit memory management is still the standard today and implicit memory management with garbage collectors will never lead to understandable or maintainable systems.
2 comments

more realistically:

app.php

   <?php
    // logic and state here

    include 'some_other.php' // modifies or adds state in unknown ways

    // more logic

    $some_variable = 3; // does the include below depend on this? who knows.

    include 'yet_another.php' // expects state, who knows what
                             // also modifies state

    echo $state; // not sure if we can remove/replace any of those includes and this will be as expected.

   ?>

The includes are being used like sloppily defined function calls which do a muddled combination of rendering and state modification.

The same can be found in Rails in partials.

Also, in Rails, helpers are essentially crippled presenters that have access to lots of effectively global state and thus cannot be reused.

And is that why each C++ iteration is adding more tools to finally implement C++ garbage collectors?