ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent/Intro.pod
(Generate patch)

Comparing AnyEvent/lib/AnyEvent/Intro.pod (file contents):
Revision 1.34 by root, Tue Dec 10 15:54:52 2013 UTC vs.
Revision 1.35 by root, Wed Dec 10 04:29:33 2014 UTC

173 my $arg = ...; 173 my $arg = ...;
174 174
175 call_me_back_later sub { $arg->method }; 175 call_me_back_later sub { $arg->method };
176 176
177Under most circumstances, closures are faster, use fewer resources and 177Under most circumstances, closures are faster, use fewer resources and
178result in much clearer code then the traditional approach. Faster, 178result in much clearer code than the traditional approach. Faster,
179because parameter passing and storing them in local variables in Perl 179because parameter passing and storing them in local variables in Perl
180is relatively slow. Fewer resources, because closures take references 180is relatively slow. Fewer resources, because closures take references
181to existing variables without having to create new ones, and clearer 181to existing variables without having to create new ones, and clearer
182code because it is immediately obvious that the second example calls the 182code because it is immediately obvious that the second example calls the
183C<method> method when the callback is invoked. 183C<method> method when the callback is invoked.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines