Jump to content

Talk:Action at a distance (computer programming)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by OrangeDog (talk | contribs) at 23:08, 29 March 2009 (project tagging using AWB). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
WikiProject iconComputer science Unassessed
WikiProject iconThis article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
???This article has not yet received a rating on Wikipedia's content assessment scale.
???This article has not yet received a rating on the project's importance scale.
Things you can help WikiProject Computer science with:

Is the Perl code really necessary here? I understand from the discussion that it is a language that has historically suffered from many problems of this kind, but the code for "package WhineyScalar" is completely incomprehensible to me -- and I used to be a part-time Perl programmer for a while, only five years ago. Perhaps it would be best if it were placed on a web page and a link added in the "See also" section?

Also, what exactly is "MoveCollectionsOfFunctionsToObjects" and how does it help reduce action across objects? It sounds like a design pattern, but it's not one I've come across before, and isn't in my copy of the original Design Patterns book. A search for that text (with spaces added) on wikipedia turns up no matching documents either.

JulesH 9 July 2005 19:06 (UTC)


Catching action at a distance in scalars

I removed this material (icncluding the heading above) from the article to talk because it is perl specific.RJFJR 21:10, 29 September 2005 (UTC)[reply]

package WhineyScalar;

sub new { tie $_[1], $_[0]; }

sub TIESCALAR {
  bless \my $a, shift;
}

sub FETCH {
  my $me = shift;
  $$me;
}

sub STORE {
  my $me = shift;
  my $oldval = $$me;
  $$me = shift;
  (my $package, my $filename, my $line) = caller; 
  print STDERR "value changed from $oldval to $$me at ", join ' ', $package, $filename, $line, "\n";
}

1;

Use this with:

use WhineyScalar;
new WhineyScalar my $foo;
$foo = 30;  # this generates diagnostic output
print $foo, "\n";
$foo++;     # this generates diagnostic output

Using tie on a scalar, one can intercept attempts to store data, and generate diagnostics to help one track down what unexpected sequence of events is taking place.


removed from article

I removed this paragraph

Accumulate and fire situations should be replaced with a command object or whole object arrangement, or a model view controller configuration.

because it contains too many redlinks and isn't clear. If we are going to reinsert it then we need to reword it first (IMHO). RJFJR 01:39, 30 September 2005 (UTC)[reply]


Removed

I also removed this:

Communications should occur in events or queues rather than shared state. If events are used, unexpected events are communicated immediately, because any component can evaluate and react to values. If queues are used, the direction of data flow is defined.

It seems a little too specific. RJFJR 01:10, 1 October 2005 (UTC)[reply]


Cleanup Taskforce

I did a good deal of editing on this article as part of the Wikipedia:Cleanup Taskforce. If anyone has comments on the changes I'd appreciate hearing them. This article has been closed out as a taskforce item. RJFJR 01:23, 1 October 2005 (UTC)[reply]

Template:Cleanup taskforce closed