Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #11710
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.straub-nv.de!uucp.gnuu.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail |
|---|---|
| Content-Type | text/plain; charset="ISO-8859-1" |
| Message-ID | <8011104.oiZZxVaoWa@PointedEars.de> (permalink) |
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Reply-To | Thomas 'PointedEars' Lahn <cljs@PointedEars.de> |
| Organization | PointedEars Software (PES) |
| Date | Sat, 11 Feb 2012 23:44:04 +0100 |
| User-Agent | KNode/4.4.11 |
| Content-Transfer-Encoding | 7Bit |
| Subject | Re: Simple parameter passing within a setInternal() call? |
| Newsgroups | comp.lang.javascript |
| References | <jh6e3o$73s$1@news.albasani.net> <jh6jln$jjo$1@news.albasani.net> <1350222.i9fspTd0WE@PointedEars.de> <jh6mr2$rbb$1@news.albasani.net> |
| Followup-To | comp.lang.javascript |
| MIME-Version | 1.0 |
| Lines | 26 |
| NNTP-Posting-Date | 11 Feb 2012 23:44:04 CET |
| NNTP-Posting-Host | b5f648f0.newsspool2.arcor-online.net |
| X-Trace | DXC=5bnYSo=m9G7=FQB?mjjV50A9EHlD;3Yc24Fo<]lROoR18kF<OcfhCO;gUnZ0:D:6`:DZm8W4\YJN<b@mF9jNikd5f0?Io3A`[l4\OB]Sm:GM=: |
| X-Complaints-To | usenet-abuse@arcor.de |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.javascript:11710 |
Followups directed to: comp.lang.javascript
Show key headers only | View raw
Andreas Bergmaier wrote:
> Thomas 'PointedEars' Lahn schrieb:
>> Andreas Bergmaier wrote:
>>> Another alternative is to use bind() or other functions, to return a
>>> function which calls repeatingStuff with the needed parameters
>>
>> This works in implementations of ECMAScript 5.x or where you have a
>> suitable scripting framework that emulates Function.prototype.bind(), but
>> it is unnecessarily inefficient by comparison.
>
> Is it? Unnecessarily in this case, yes, but if you have defined
> "repeatingStuff" elsewhere it is imho much more elegant than coding
>
> var x;
> setInterval( function(){
> doRepeatingStuffWith(x);
> }, 5000);
That is not even equivalent in the first place. Clearly you do not
understand bind(). Please refrain from recommending it until you do.
PointedEars
--
When all you know is jQuery, every problem looks $(olvable).
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Simple parameter passing within a setInternal() call? Tuxedo <tuxedo@mailinator.com> - 2012-02-11 20:04 +0100
Re: Simple parameter passing within a setInterval() call? Tuxedo <tuxedo@mailinator.com> - 2012-02-11 20:39 +0100
Re: Simple parameter passing within a setInterval() call? Dr J R Stockton <reply1206@merlyn.demon.co.uk> - 2012-02-12 22:02 +0000
Re: Simple parameter passing within a setInternal() call? Andreas Bergmaier <andber93@web.de> - 2012-02-11 21:39 +0100
Re: Simple parameter passing within a setInternal() call? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-02-11 22:06 +0100
Re: Simple parameter passing within a setInternal() call? Andreas Bergmaier <andber93@web.de> - 2012-02-11 22:33 +0100
Re: Simple parameter passing within a setInternal() call? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-02-11 23:44 +0100
Re: Simple parameter passing within a setInternal() call? Andreas Bergmaier <andber93@web.de> - 2012-02-12 03:04 +0100
Re: Simple parameter passing within a setInterval() call? Tuxedo <tuxedo@mailinator.com> - 2012-02-12 09:22 +0100
csiph-web