Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #29850

Re: Refer object within itself

Newsgroups comp.lang.javascript
Date 2016-03-07 13:44 -0800
References (12 earlier) <XnsA5C292470C038eejj99@194.109.6.166> <00d49959-20f9-43ec-8d80-dc2d3991a31c@googlegroups.com> <XnsA5C379E8FC4CDeejj99@194.109.6.166> <ac1be59e-d61f-4a36-9ab8-3216b0043ad7@googlegroups.com> <XnsA5C46D5A48D05eejj99@194.109.6.166>
Message-ID <3655f397-1fa2-4d4a-a36f-a1fa688e9461@googlegroups.com> (permalink)
Subject Re: Refer object within itself
From Scott Sauyet <scott.sauyet@gmail.com>

Show all headers | View raw


Evertjan. wrote:
> Scott Sauyet wrote:
> 
>>> An absolute "the best one"???????????? [see below]
>> 
>> Yes, simplest in both conception and implementation. 
> 
> What nonsense, this is just your opinion,

Surely that's just your opinion about the matter, right?


> while my opinion is different.

Do you really believe it necessary to apologize for every opinion
stated on USENET with "IMHO"?


> [ ... ]
>> it does the job required and will not throw the errors 
>> you're worried about if used correctly.  
> 
> "if used correctly", that is just the crux.

That is always the crux.  The OP has not weighed back in on the issue,
but most of us are making an assumption that seems very different from
what you're assuming.

You seem to be assuming that only the initial ratio is important.  If
that's the case, then a technique like mine or yours is fine; the choice
might depend on whether one wants a mutable or immutable object, although
I didn't go as far as demonstrating actual immutable versions.

Most everyone seems to assume that the continued 2:1 ratio of 
height:width is essential.  If that's the case, then your technique 
fails, and allows one to get objects into an inconsistent state.  
That, to my mind, is significantly worse than throwing an error.

Probably the reason that most people seem to be making the latter 
assumption is that the OP specifically mentioned your technique, but
was looking for something better, and asked, "How do I reference to
the object itself within the object?"  Your code does not answer this
question.
 
  -- Scott

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Refer object within itself Andrew Poulos <ap_prog@hotmail.com> - 2016-02-26 22:50 +1100
  Re: Refer object within itself Scott Sauyet <scott.sauyet@gmail.com> - 2016-02-26 04:51 -0800
    Re: Refer object within itself "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-02-26 14:15 +0100
  Re: Refer object within itself "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-02-26 16:43 +0100
    Re: Refer object within itself Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-02-26 19:25 +0100
  Re: Refer object within itself Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-02-26 19:23 +0100
  Refer object within itself Ram Tobolski <ramtob@gmail.com> - 2016-02-28 10:06 -0800
    Re: Refer object within itself "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-02-28 23:07 +0100
      Re: Refer object within itself "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-02-28 23:23 +0100
        Re: Refer object within itself Stefan Weiss <krewecherl@gmail.com> - 2016-02-29 00:11 +0100
        Re: Refer object within itself Aleksandro <aleksandro@gmx.com> - 2016-02-29 14:49 -0300
          Re: Refer object within itself "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-02-29 19:49 +0100
            Re: Refer object within itself Aleksandro <aleksandro@gmx.com> - 2016-03-01 10:48 -0300
              Re: Refer object within itself "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-01 17:22 +0100
                Re: Refer object within itself Aleksandro <aleksandro@gmx.com> - 2016-03-01 15:07 -0300
                Re: Refer object within itself "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-01 20:26 +0100
                Re: Refer object within itself Aleksandro <aleksandro@gmx.com> - 2016-03-04 21:53 -0300
                Re: Refer object within itself "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-05 14:22 +0100
                Re: Refer object within itself Scott Sauyet <scott.sauyet@gmail.com> - 2016-03-05 10:17 -0800
                Re: Refer object within itself "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-06 11:59 +0100
                Re: Refer object within itself Ram Tobolski <ramtob@gmail.com> - 2016-03-06 10:48 -0800
                Re: Refer object within itself Scott Sauyet <scott.sauyet@gmail.com> - 2016-03-06 19:07 -0800
                Re: Refer object within itself "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-07 10:44 +0100
                Re: Refer object within itself Aleksandro <aleksandro@gmx.com> - 2016-03-07 12:54 -0300
                Re: Refer object within itself "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-07 17:59 +0100
                Re: Refer object within itself Scott Sauyet <scott.sauyet@gmail.com> - 2016-03-07 13:44 -0800
                Re: Refer object within itself "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-07 22:59 +0100
                Re: Refer object within itself Scott Sauyet <scott.sauyet@gmail.com> - 2016-03-07 17:00 -0800
                Re: Refer object within itself "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-08 10:24 +0100
                Re: Refer object within itself Scott Sauyet <scott.sauyet@gmail.com> - 2016-03-08 13:03 -0800

csiph-web