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

Comparing AnyEvent/lib/AE.pm (file contents):
Revision 1.5 by root, Tue Jan 5 18:59:29 2010 UTC vs.
Revision 1.6 by root, Wed Mar 24 21:22:57 2010 UTC

21make a program more readable, despite the lack of named parameters. 21make a program more readable, despite the lack of named parameters.
22Function calls also allow more static type checking than method calls, so 22Function calls also allow more static type checking than method calls, so
23many mistakes are caught at compiletime with this API. 23many mistakes are caught at compiletime with this API.
24 24
25Also, some backends (Perl and EV) are so fast that the method call 25Also, some backends (Perl and EV) are so fast that the method call
26overhead is very noticeable (with EV it increases the time five- to 26overhead is very noticeable (with EV it increases the execution time five-
27six-fold, with Perl the method call overhead is about a factor of two). 27to six-fold, with Perl the method call overhead is about a factor of two).
28 28
29At the moment, there will be no checking (L<AnyEvent::Strict> does not 29At the moment, there will be no checking (L<AnyEvent::Strict> does not
30affect his API), so the L<AnyEvent> API has a definite advantage here 30affect his API), so the L<AnyEvent> API has a definite advantage here
31still. 31still.
32 32
33Note that the C<AE> API is an alternative to, not the future version of, 33Note that the C<AE> API is an alternative to, not the future version of,
34the AnyEvent API. Both APIs can be used interchangably and and there are 34the AnyEvent API. Both APIs can be used interchangably and and there are
35no plans to "switch", so if in doubt, use the L<AnyEvent> API. 35no plans to "switch", so if in doubt, feel free to use the L<AnyEvent>
36API in new code.
36 37
37As the AE API is complementary, not everything in the AnyEvent API is 38As the AE API is complementary, not everything in the AnyEvent API is
38available, so you still need to use AnyEvent for the finer stuff. Also, 39available, so you still need to use AnyEvent for the finer stuff. Also,
39you should not C<use AE> directly, C<use AnyEvent> will provide the AE 40you should not C<use AE> directly, C<use AnyEvent> will provide the AE
40namespace. 41namespace.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines