Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #30950
| Path | csiph.com!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? |
| Date | Wed, 20 Jul 2016 15:08:52 +0200 |
| Organization | PointedEars Software (PES) |
| Lines | 29 |
| Message-ID | <1703874.PYKUYFuaPT@PointedEars.de> (permalink) |
| References | <nmmso1$uof$1@shakotay.alphanet.ch> <e66dc666-80eb-4a05-8650-4681e2cb7be4@googlegroups.com> <1961081.iZASKD2KPV@PointedEars.de> <941fff3e-5d05-4648-ba43-51e9ceb3ca7d@googlegroups.com> |
| Reply-To | Thomas 'PointedEars' Lahn <cljs@PointedEars.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| Content-Transfer-Encoding | 8Bit |
| X-Trace | solani.org 1469020133 31261 eJwFwYEBgDAIA7CXQIF154C0/59gkm95fScqK1KpKDQXWvRR0y+bTwTaizZayQZS4Bh5J38+hBJo (20 Jul 2016 13:08:53 GMT) |
| X-Complaints-To | abuse@news.solani.org |
| NNTP-Posting-Date | Wed, 20 Jul 2016 13:08:53 +0000 (UTC) |
| User-Agent | KNode/4.14.2 |
| X-User-ID | eJwNyMEBwCAIA8CVQEiUcQRh/xHaex6MytpO0DEYjwj02TcWMoin/Y9g4RxuNiehW1SuZRUYWfl6xsXY1+wDKjYU+A== |
| Cancel-Lock | sha1:eAsQ8I+MYKYirG8Mlk4QGrTSFdQ= |
| X-NNTP-Posting-Host | eJwNwgERwDAIA0BLdECayOko+Jew3X86FmoHEpHzO8fGG64c6oFF8b2i8U6h5S1zUkurdqk/FscQzA== |
| Xref | csiph.com comp.lang.javascript:30950 |
Show key headers only | View raw
Michael Haufe (TNO) wrote:
> […] Thomas 'PointedEars' Lahn wrote:
>> Michael Haufe (TNO) wrote:
>> > var resolve = function resolve(){...}
>> >
>> > This form is redundant.
>> No, it is not.
>
> Correct in semantic details, but by "redundant" in this case I was using
> the synonym: "useless".
AISB, it is useless if and only if the function is not referred to from
within its body.
> I would also use the same word "redundant" if the code happened to be the
> following:
>
> var foo = function bar(){ /* explicit example with no reference to bar */
> }
It is still not useless if the function modifies the variable value but a
reference to itself has to be kept (self-modifying code).
--
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? Une Bévue <unbewusst.sein@fai.invalid> - 2016-07-20 05:55 +0200
Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? Une Bévue <unbewusst.sein@fai.invalid> - 2016-07-20 08:20 +0200
Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-07-19 23:25 -0700
Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-07-20 12:15 +0200
Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-07-20 05:15 -0700
Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-07-20 15:08 +0200
Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-07-20 09:23 -0700
Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? Une Bévue <unbewusst.sein@fai.invalid> - 2016-07-23 18:52 +0200
Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-07-20 12:15 +0200
Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? Stanimir Stamenkov <s7an10@netscape.net> - 2016-07-28 08:31 +0300
Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? Une Bévue <unbewusst.sein@fai.invalid> - 2016-08-01 06:44 +0200
csiph-web