Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • "Inside every large program, there is a small program trying to get out." --Tony Hoare

    Abstractions incur overhead, yep. Fortunately, POE's higher-level abstractions (wheels, components) are entirely optional. The low-level abstract event loop primitives are still there: select_read(), alarm(), sig(), etc. There's a smaller POE inside. It's already out, but it's been a bit neglected.

    History has a bigger role to play than abstractions in the obstruction of change. A long-established, stable module like POE has reduced mobility because lots of people actually use it. A newbie module like Reflex [cpan.org] can reinvent itself every few weeks, and nobody is going to mind. The depth of the abstraction stack has nothing to do with it. Although POE+Reflex's is shorter and (I hope) a bit more efficient as a result.

    If anything, the depth of the abstraction stack allows more rapid change to occur. There's wiggle room in each level of abstraction, and if I'm allowed to consider modules to be abstractions, then delegating development (via CPAN, for example) accelerates change. But I digress on a technicality. :)

    I think it's a mistake to talk about POE's "programming style" as if that's a particular thing. The Perl I'm using has a motto: There Is More Than One Way To Do It. That applies to using POE. For example, you may prefer condvars or promises to callbacks. POE can do that [cpan.org]. And if you prefer to write classes that provide callbacks or can be used as promises, then POE can do that via Reflex [cpan.org].

    Yeah, the flexibility comes at a cost, but, as you say, all things do. I think the benefits are worth it, but of course I'm always looking for a better cost/benefit ratio. All reasonable suggestions considered.

    • The context I was talking about POE in was this: a program written to use it versus one written to do something else looks very different. This means that it's hard to switch styles. A lot of changes have to happen to a lot of the program.

      Everything goes out of fashion eventually.

      That was part of the point of evaluating how entrenched any abstraction will make you. Being entrenched by an abstraction is a mark against it.

      Too much and leaky abstraction is another matter and I whipped on other things there