Newsgroups: comp.lang.javascript
Followup-To: comp.lang.javascript
From: Thomas 'PointedEars' Lahn <PointedE...@web.de>
Date: Fri, 28 Sep 2012 15:39:17 +0200
Local: Fri, Sep 28 2012 9:39 am
Subject: Re: Who's eaten my apple and why?
Stefan Weiss wrote:
This is arguably the best analogy for this mechanism that I have read so > I was talking about reference types with a co-worker a couple of months > ago, and we found an analogy that seemed to help: > One can imagine variables as small envelopes, just large enough to hold
> When you create an object, it's like handing your cloak (the object) to
> Now you can use this receipt to access your cloak anytime. You can copy
> When you empty your envelope, you lose the reference. The cloak still
> The analogy is getting a little stretched now, but bear with me...
> When you write options.add(o), that's like showing your receipt to an
far. And it is funny, too. +1
PointedEars
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||