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


Groups > comp.lang.javascript > #29581

Re: Newbie trying to understand object oriented programming

From Tim Streater <timstreater@greenbee.net>
Newsgroups comp.lang.javascript
Subject Re: Newbie trying to understand object oriented programming
Date 2016-02-08 17:33 +0000
Message-ID <080220161733161611%timstreater@greenbee.net> (permalink)
References <664696a0-3ce3-484c-aeaf-2fdf45781bb4@googlegroups.com> <9cydnYY0F6n_AyjLnZ2dnUU7-fOdnZ2d@westnet.com.au> <9ffad5b6-4de6-463c-b919-bd139402c94e@googlegroups.com> <djvebb1m6snmue6vo58jqu9r7o3rihq93k@4ax.com> <a297cc47-5163-4ca7-b0f3-a1174cc72348@googlegroups.com>

Show all headers | View raw


In article <a297cc47-5163-4ca7-b0f3-a1174cc72348@googlegroups.com>,
<bit-naughty@hotmail.com> wrote:

>On Sunday, February 7, 2016 at 10:59:23 PM UTC+5:30, John Harris wrote:
>
>> Now the hurl function is shared by all rock-hurling objects 
>
>AHH - THIS was the vital info that was of most importance in everything you
>said.
>
>Wow! Thanks for typing all that out, man, appreciate it :)
>
>But the question is, when writing a piece of software, how do you predict that
>there's *going to _be_ a lot of rock-hurling objects, all of whom will *need*
>to have the same "hurl" function inside them* ? 

Well that'll be a matter for you. It'll show up in your design that
this object and that one need the same *hurl* function. If OTOH the
*hurl* function is different, you'll need another class. Note that you
can still call it *hurl* in both classes if you want, if it's doing
essentially the same thing but requires different code in the two
cases.

>How often does this actually occur?

Any time you've got lots of the same object showing up in your app.
Rows in a table, f'rinstance, are likely to be all the same. Or tables,
if you've got a number of those.

-- 
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee

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


Thread

Newbie trying to understand object oriented programming bit-naughty@hotmail.com - 2016-02-05 06:55 -0800
  Re: Newbie trying to understand object oriented programming 4ndre4 <4ndre4@4ndre4.com.invalid> - 2016-02-05 18:56 +0000
  Re: Newbie trying to understand object oriented programming Tim Slattery <tim@risingdove.com> - 2016-02-05 14:07 -0500
  Re: Newbie trying to understand object oriented programming Aleksandro <aleksandro@gmx.com> - 2016-02-05 17:34 -0300
    Re: Newbie trying to understand object oriented programming Scott Sauyet <scott.sauyet@gmail.com> - 2016-02-05 19:10 -0800
      Re: Newbie trying to understand object oriented programming 4ndre4 <4ndre4@4ndre4.com.invalid> - 2016-02-06 08:33 +0000
        Re: Newbie trying to understand object oriented programming Scott Sauyet <scott.sauyet@gmail.com> - 2016-02-06 08:24 -0800
          Re: Newbie trying to understand object oriented programming 4ndre4 <4ndre4@4ndre4.com.invalid> - 2016-02-06 18:48 +0000
            Re: Newbie trying to understand object oriented programming Scott Sauyet <scott.sauyet@gmail.com> - 2016-02-06 12:28 -0800
              Re: Newbie trying to understand object oriented programming 4ndre4 <4ndre4@4ndre4.com.invalid> - 2016-02-06 21:01 +0000
                Re: Newbie trying to understand object oriented programming Scott Sauyet <scott.sauyet@gmail.com> - 2016-02-07 15:23 -0800
                Re: Newbie trying to understand object oriented programming Aleksandro <aleksandro@gmx.com> - 2016-02-08 11:45 -0300
            Re: Newbie trying to understand object oriented programming "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-02-08 13:39 -0800
              Re: Newbie trying to understand object oriented programming Scott Sauyet <scott.sauyet@gmail.com> - 2016-02-11 08:09 -0800
                Re: Newbie trying to understand object oriented programming "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-02-11 12:22 -0800
                Re: Newbie trying to understand object oriented programming John Harris <niam@jghnorth.org.uk.invalid> - 2016-02-12 11:09 +0000
                Re: Newbie trying to understand object oriented programming "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-02-12 13:34 -0800
                Re: Newbie trying to understand object oriented programming John Harris <niam@jghnorth.org.uk.invalid> - 2016-02-13 14:40 +0000
                Re: Newbie trying to understand object oriented programming "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-02-14 10:18 -0800
                Re: Newbie trying to understand object oriented programming Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-02-14 21:27 +0100
                Re: Newbie trying to understand object oriented programming "J. Clarke" <j.clarke.873638@gmail.com> - 2016-05-14 10:13 -0400
                Re: Newbie trying to understand object oriented programming Tim Streater <timstreater@greenbee.net> - 2016-05-14 16:47 +0100
                Re: Newbie trying to understand object oriented programming "J. Clarke" <j.clarke.873638@gmail.com> - 2016-05-15 07:05 -0400
                Re: Newbie trying to understand object oriented programming "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-14 10:08 -0700
                Re: Newbie trying to understand object oriented programming "J. Clarke" <j.clarke.873638@gmail.com> - 2016-05-15 07:02 -0400
                Re: Newbie trying to understand object oriented programming "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-15 13:11 -0700
                Re: Newbie trying to understand object oriented programming John Harris <niam@jghnorth.org.uk.invalid> - 2016-05-15 17:03 +0100
                Re: Newbie trying to understand object oriented programming "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-15 13:20 -0700
                Re: Newbie trying to understand object oriented programming Gene Wirchenko <genew@telus.net> - 2016-05-16 11:55 -0700
                Re: Newbie trying to understand object oriented programming Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-05-16 21:39 +0200
                Re: Newbie trying to understand object oriented programming "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-17 07:30 -0700
                Re: Newbie trying to understand object oriented programming John Harris <niam@jghnorth.org.uk.invalid> - 2016-05-17 15:34 +0100
                Re: Newbie trying to understand object oriented programming Scott Sauyet <scott.sauyet@gmail.com> - 2016-02-13 17:50 -0800
                Re: Newbie trying to understand object oriented programming John Harris <niam@jghnorth.org.uk.invalid> - 2016-02-14 11:15 +0000
                Re: Newbie trying to understand object oriented programming "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-02-14 11:03 -0800
                Re: Newbie trying to understand object oriented programming John Harris <niam@jghnorth.org.uk.invalid> - 2016-02-15 20:18 +0000
                Re: Newbie trying to understand object oriented programming Scott Sauyet <scott.sauyet@gmail.com> - 2016-02-13 16:54 -0800
  Re: Newbie trying to understand object oriented programming Danny <dann90038@gmail.com> - 2016-02-05 15:00 -0800
  Re: Newbie trying to understand object oriented programming RobG <rgqld@iinet.net.au> - 2016-02-06 17:18 +1000
    Re: Newbie trying to understand object oriented programming Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-02-06 16:01 +0100
    Re: Newbie trying to understand object oriented programming bit-naughty@hotmail.com - 2016-02-07 04:47 -0800
      Re: Newbie trying to understand object oriented programming Tim Streater <timstreater@greenbee.net> - 2016-02-07 13:16 +0000
      Re: Newbie trying to understand object oriented programming John Harris <niam@jghnorth.org.uk.invalid> - 2016-02-07 17:29 +0000
        Re: Newbie trying to understand object oriented programming bit-naughty@hotmail.com - 2016-02-08 08:53 -0800
          Re: Newbie trying to understand object oriented programming Tim Streater <timstreater@greenbee.net> - 2016-02-08 17:33 +0000
  Re: Newbie trying to understand object oriented programming Joao Rodrigues <jr@none.com> - 2016-02-06 11:56 -0200

csiph-web