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.
  • by lbr (5199) on 2009.05.22 12:59 (#68742)

    If memory serves, Self had a system to make any slot a parent-slot - by convention "parent*" was the object cloned from, but any slot could be a parent-slot by adding a * to the name. How dispatch was eventually (mis-)handled, I have no recollection...

    NewtonScript was based on Self, but extended the convention to always have two parent-slots for gui-elements (business-object + gui-object), but not any more, as I recall.

    And speaking of prototype-based language, why would anyone add first-order functions to a language and not make them closures. Yes, javascript, I'm looking at you.

    ObUsePerlSucks: adding my own paragraphs? really?

    • Huh? JavaScript has closures. They work perfectly well. I've been using them for years.

      But there is a major gotcha. Variables declared with var are always scoped to the nearest function call. So if you create closures in a loop, they will all point to the same variable. However once you know that's the issue, that's easily fixed - just call a function from within the loop whose job is to scope the variable correctly.

      • Ah, that makes "sense" (and it was that gotcha that had gotten me). Sigh. JINP.