in reply to Re^2: Reading binary files - program structure
in thread Reading binary files - program structure

Interesting, I didn't even know you could do that! Presumably the advantage is speed? Being a compile-time thing rather than a run-time eval?

If/when I finally make progress on this I'll compare the approaches.

  • Comment on Re^3: Reading binary files - program structure

Replies are listed 'Best First'.
Re^4: Reading binary files - program structure
by BrowserUk (Patriarch) on May 25, 2010 at 20:50 UTC
    Presumably the advantage is speed? Being a compile-time thing rather than a run-time eval?

    That's a beneficial side-effect of avoiding string eval. But mostly just a healthy aversion to using it, if it is easier to avoid it.

    I don't subscribe to the evil-eval notion--if I need to evaluate a runtime mathematical expression, I will. Far easier to use Perl's expression parser than write my own, or discover the limitations of someone else's--but for the usage outlined, everything is known at compile-time, so no need to invoke the compiler again (multiple times) at runtime.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.