Re: Naming convention for variable holding an eventual reference
David-Sarah Hopwood <david.hopwood-mRVxzIiVagSlV3Ge8JjJtnfLna9zW77MtUK59QYPAWc@public.gmane.org>
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <[email protected]> |
Tyler Close wrote: > On Fri, May 16, 2008 at 3:07 PM, Raoul Duke <[email protected]> wrote: >>> Q.post(drum, 'bang', [ 1 ]) >> From the perspective of a newbie looking at code which uses that >> style, it sure uses an awful lot of "Q.fn(" everywhere which looks to >> make the code less readable (if perhaps more robust in other ways). >> Not that I have a constructive alternative to offer. > > Ya, that bothers me too. It can be made a little better by adding the > following preamble to your Javascript file: > > var post = Q.post; > var get = Q.get; > var when = Q.when; For ADsafe compatibility, that should be: var post = Q.getPost(); var get = Q.getGet(); var when = Q.getWhen(); (ADsafe.get will not return a function.) -- David-Sarah Hopwood