Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #10805
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Function Declaration as anti-pattern? |
| Date | 2012-01-30 14:37 -0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <mn6ei75mi4iu1rqsjr2vuqdooqpvfefnp2@4ax.com> (permalink) |
| References | <6bs3i7509l7qol48u4i9ac40h85o6n96b3@4ax.com> <4cfdca2c-83b5-402a-85b1-9f58e5e174e3@n6g2000vbz.googlegroups.com> |
On Mon, 30 Jan 2012 13:29:56 -0800 (PST), Scott Sauyet
<scott.sauyet@gmail.com> wrote:
>Ross McKay wrote:
>> OK, this is different: apparently, the function declaration is now seen
>> as an anti-pattern.
>
>Nonsense.
>
>I do choose to use function expressions instead of function
>declarations for similar reasons as Resig. There are a great number
>of beginning and intermediate JS users who (unfortunately for them)
>often use my code as samples of how to develop. So I tend to favor
>consistency, and since I *need* function expressions but not function
>declarations, I use the former everywhere.
>
>But for systems where that level of consistency is not important, or
>where function expressions are not needed, there is no reason to try
>to force the function expression style on users.
My, my! Someone not forcing his way down everyone else's throat?
I may faint.
Sincerely,
Gene Wirchenko
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Function Declaration as anti-pattern? Ross McKay <au.org.zeta.at.rosko@invalid.invalid> - 2012-01-27 11:45 +1100
Re: Function Declaration as anti-pattern? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-26 17:34 -0800
Re: Function Declaration as anti-pattern? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-26 19:53 -0800
Re: Function Declaration as anti-pattern? John G Harris <john@nospam.demon.co.uk> - 2012-01-27 16:50 +0000
Re: Function Declaration as anti-pattern? Scott Sauyet <scott.sauyet@gmail.com> - 2012-01-30 13:29 -0800
Re: Function Declaration as anti-pattern? Gene Wirchenko <genew@ocis.net> - 2012-01-30 14:37 -0800
Re: Function Declaration as anti-pattern? Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2012-01-31 18:32 +0100
Re: Function Declaration as anti-pattern? Ross McKay <au.org.zeta.at.rosko@invalid.invalid> - 2012-02-02 16:20 +1100
Re: Function Declaration as anti-pattern? Matt McDonald <matt@fortybelow.ca> - 2012-02-02 08:25 -0700
Re: Function Declaration as anti-pattern? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-02-02 11:21 -0800
csiph-web