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
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Self and NewtonScript (Score:1)
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?
Reply to This
Re: (Score:1)
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.
Re: (Score:1)