Message from discussion
what is var self = this; ?
Received: by 10.150.195.11 with SMTP id s11mr1496443ybf.32.1288195030559;
Wed, 27 Oct 2010 08:57:10 -0700 (PDT)
X-BeenThere: nodejs@googlegroups.com
Received: by 10.150.234.10 with SMTP id g10ls554970ybh.4.p; Wed, 27 Oct 2010
08:57:06 -0700 (PDT)
Received: by 10.150.196.1 with SMTP id t1mr4602678ybf.19.1288195026892;
Wed, 27 Oct 2010 08:57:06 -0700 (PDT)
Received: by 10.150.196.1 with SMTP id t1mr4602677ybf.19.1288195026849;
Wed, 27 Oct 2010 08:57:06 -0700 (PDT)
Return-Path: <joe.d.develo...@gmail.com>
Received: from mail-yx0-f177.google.com (mail-yx0-f177.google.com [209.85.213.177])
by gmr-mx.google.com with ESMTP id q8si3641046ybk.8.2010.10.27.08.57.05;
Wed, 27 Oct 2010 08:57:05 -0700 (PDT)
Received-SPF: pass (google.com: domain of joe.d.develo...@gmail.com designates 209.85.213.177 as permitted sender) client-ip=209.85.213.177;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of joe.d.develo...@gmail.com designates 209.85.213.177 as permitted sender) smtp.mail=joe.d.develo...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by yxi11 with SMTP id 11so568794yxi.22
for <nodejs@googlegroups.com>; Wed, 27 Oct 2010 08:57:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:received:mime-version:received:in-reply-to
:references:from:date:message-id:subject:to:content-type;
bh=a4t1mRA/Nc6eDA0D9cMKJ9Fo0lPyAZhOVLYg2oOtyEY=;
b=L5LJ1ulZxRscA6865Nq1ns4TEyMRpJfv+Bfy6NZXhC7c1eQNgwkD4hUxa1WnpvS23T
dG4cvWvKQ0mcybca49H2jdMqBiGb4rOYZPmVY6z/D8YRwJ9gJ+5YeaFJygxgO6+oIOgi
7SxOj1NH+BqtjSkvMvofabN5HDWIrmh3IZWwE=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=mime-version:in-reply-to:references:from:date:message-id:subject:to
:content-type;
b=ma7ijtMzuVZZP4YFrhbf1DnzcFphsgeU29qQorajntb14FcvjP7a0tHv6SQJNxuCvp
y8Kib5YaiNG2oyykfs5P3R8qdW11n0Hnsy0iESqp589g1O4aOIU6HWg7tAJaSjn8dkLe
m7JzG4N8Jc+BDxkN8NJgGGeQDalTNb3jMAaGM=
Received: by 10.90.34.10 with SMTP id h10mr60559agh.38.1288195025655; Wed, 27
Oct 2010 08:57:05 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.90.251.1 with HTTP; Wed, 27 Oct 2010 08:56:44 -0700 (PDT)
In-Reply-To: <AANLkTi=0Kj=8LaKCeFUrFFnR+9EZns9NbDQLvg=y5...@mail.gmail.com>
References: <AANLkTimUHUYKaRh6X2Xom+C3_Br1Xsr339=Dmz+7c...@mail.gmail.com>
<f075782e-9d53-4e11-990a-7b8d4523e...@c20g2000yqj.googlegroups.com>
<AANLkTi=3BmJZ0tms3J+iusdOo4q7K4NYYhX_m1b29...@mail.gmail.com>
<23894F9D-62D6-45C9-94B5-76BC066DA...@creationix.com> <AANLkTi=0Kj=8LaKCeFUrFFnR+9EZns9NbDQLvg=y5...@mail.gmail.com>
From: Joe Developer <joe.d.develo...@gmail.com>
Date: Wed, 27 Oct 2010 22:56:44 +0700
Message-ID: <AANLkTi=b8fNMomG1XQFML3YbpLCinknmbEjfvY-3-...@mail.gmail.com>
Subject: Re: [nodejs] Re: what is var self = this; ?
To: nodejs@googlegroups.com
Content-Type: multipart/alternative; boundary=0016e64bba34e7d94604939b461c
--0016e64bba34e7d94604939b461c
Content-Type: text/plain; charset=UTF-8
On Wed, Oct 27, 2010 at 10:48 PM, Ryan Gahl <ryan.g...@gmail.com> wrote:
>
> On Wed, Oct 27, 2010 at 10:40 AM, Tim Caswell <t...@creationix.com> wrote:
>
>> @Ryan Gahl, I know you're trying to reduce unnecessary bike-shedding and
>> some of these threads probably annoy you, but it's not the same thing. The
>> thread about OO styles is very informative to many people new to javascript,
>> and the OO style you use does have a real impact on both the readability AND
>> the runtime behavior of your code. In this thread, while what you name the
>> "self" or "me" variable has little consequence, the technique of using it is
>> very powerful and often required for a lot of use cases and styles. Instead
>> of saying this conversation is meaningless help steer it toward the
>> important points, like what does "this" mean in JavaScript, why are closures
>> important, and especially why does this matter to a node.js programmer.
>
>
>
> I hear what you're saying. I just feel like the question has been answered,
> and continuing to debate things like "just don't use 'new' and that gets
> around having to capture scope"... "use .bind() instead because I find it
> more readable"... etc amounts to the same ultimate level of value as a
> debate over semicolons or comma first styles. That said, my little
> semicolons comments are to taken only as tongue in cheek. Obviously if
> people find it worth their while to engage in such discussions beyond the
> point of having answered the OPs question, I have little power to stop it.
> Don't mind me.
>
The thing is that discussions like these can clear up misapprehensions and
increase the competence of the people who ultimately contribute to the node
ecology. People shouldn't fear to ask questions lest they be sniped by a
douche with a penchant for semicolons; That node performance test thread?
Same thing. I did a similar thing in the macOS kernel panic thread but it
was atleast marginally funny (and I did feel like a douche for doing it).
> --
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To post to this group, send email to nodejs@googlegroups.com.
> To unsubscribe from this group, send email to
> nodejs+unsubscribe@googlegroups.com<nodejs%2Bunsubscribe@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en.
>
--0016e64bba34e7d94604939b461c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<br><br><div class=3D"gmail_quote">On Wed, Oct 27, 2010 at 10:48 PM, Ryan G=
ahl <span dir=3D"ltr"><<a href=3D"mailto:ryan.g...@gmail.com">ryan.gahl@=
gmail.com</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im"><br><div class=3D"gmail_quote">On Wed, Oct 27, 2010 at 10=
:40 AM, Tim Caswell <span dir=3D"ltr"><<a href=3D"mailto:tim@creationix.=
com" target=3D"_blank">t...@creationix.com</a>></span> wrote:<br><blockqu=
ote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc s=
olid;padding-left:1ex">
@Ryan Gahl, I know you're trying to reduce unnecessary bike-shedding an=
d some of these threads probably annoy you, but it's not the same thing=
. =C2=A0The thread about OO styles is very informative to many people new t=
o javascript, and the OO style you use does have a real impact on both the =
readability AND the runtime behavior of your code. =C2=A0In this thread, wh=
ile what you name the "self" or "me" variable has littl=
e consequence, the technique of using it is very powerful and often require=
d for a lot of use cases and styles. =C2=A0Instead of saying this conversat=
ion is meaningless help steer it toward the important points, like what doe=
s "this" mean in JavaScript, why are closures important, and espe=
cially why does this matter to a node.js programmer.</blockquote>
</div><div><br></div><div><br></div></div><div>I hear what you're sayin=
g. I just feel like the question has been answered, and continuing to debat=
e things like "just don't use 'new' and that gets around h=
aving to capture scope"... "use .bind() instead because I find it=
more readable"... etc amounts to the same ultimate level of value as =
a debate over semicolons or comma first styles. That said, my little semico=
lons comments are to taken only as tongue in cheek. Obviously if people fin=
d it worth their while to engage in such discussions beyond the point of ha=
ving answered the OPs question, I have little power to stop it. Don't m=
ind me.</div>
</blockquote><div><br></div><div>The thing is that discussions like these c=
an clear up misapprehensions and increase the competence of the people who =
ultimately contribute to the node ecology. People shouldn't fear to ask=
questions lest they be sniped by a douche with a penchant for semicolons; =
That node performance test thread? Same thing. I did a similar thing in the=
macOS kernel panic thread but it was atleast marginally funny (and I did f=
eel like a douche for doing it). =C2=A0</div>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">
<p></p>
-- <br><div><div></div><div class=3D"h5">
You received this message because you are subscribed to the Google Groups &=
quot;nodejs" group.<br>
To post to this group, send email to <a href=3D"mailto:nodejs@googlegroups.=
com" target=3D"_blank">nodejs@googlegroups.com</a>.<br>
To unsubscribe from this group, send email to <a href=3D"mailto:nodejs%2Bun=
subscribe@googlegroups.com" target=3D"_blank">nodejs+unsubscribe@googlegrou=
ps.com</a>.<br>
For more options, visit this group at <a href=3D"http://groups.google.com/g=
roup/nodejs?hl=3Den" target=3D"_blank">http://groups.google.com/group/nodej=
s?hl=3Den</a>.<br>
</div></div></blockquote></div><br>
--0016e64bba34e7d94604939b461c--