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


Groups > comp.lang.javascript > #7578

Re: Objects comparaison ?

From Antony Scriven <adscriven@gmail.com>
Newsgroups comp.lang.javascript
Subject Re: Objects comparaison ?
Date 2011-10-19 17:32 -0700
Organization http://groups.google.com
Message-ID <3c2eb6d6-7d8c-452b-8634-179bf07de358@n18g2000vbv.googlegroups.com> (permalink)
References (9 earlier) <659c944b-9ab1-46e9-a360-dd2b2f373dd4@c1g2000vbw.googlegroups.com> <07b4ce23-b2f9-4412-a50c-42f0043f8bc0@m4g2000yqm.googlegroups.com> <13cf344d-d143-4515-8170-9cf46a8c1cde@m1g2000vbm.googlegroups.com> <990c904a-4cf4-448d-b461-914b43471aa2@fk25g2000vbb.googlegroups.com> <ef68980d-4b4f-4a53-b768-2026c7d0d2a6@w1g2000yqm.googlegroups.com>

Show all headers | View raw


On Oct 20, 12:54 am, "Michael Haufe (TNO)" wrote:

 > On Oct 19, 5:32 pm, Antony Scriven <adscri...@gmail.com> wrote:
 >
 > > On Oct 19, 1:21 am, "Michael Haufe (TNO)" wrote:
 >
 > > > On Oct 18, 6:51 pm, "Michael Haufe (TNO)">
<t...@thenewobjective.com> wrote:
 >
 > > >
 > > > > On Oct 18, 4:05 pm, Scott Sauyet
 > > > > <scott.sau...@gmail.com> wrote:
 > > >
 > > > > > John G Harris wrote:
 > > > > > > Object is a constructor. Its job is to *construct*,
 > > > > > > not to act like a Christmas tree with shiny
 > > > > > > ornaments dangling from it.
 > > >
 > > > > > So, do you also object to Object.create, Date.parse,
 > > > > > Number.NaN, String.fromCharCode and everywhere else
 > > > > > the language associates 'static' properties with
 > > > > > constructor functions?
 > > >
 > > > > Yes
 > > >
 > > > More productively, and for the sake of argument only:
 > > >
 >
 > > Well, since we're already off-topic :-)
 >
 > > > String.fromCharCode    ->  7.fromCharCode()
 >
 > > And neither of those can be usefully passed to map(). :-(
 >
 > If this was pure OOP, there wouldn't be a separate map function in
the
 > first place of course.
 >
 > [1,2,3].map(...
 >     this.fromCharCode()
 > ...)

So map() doesn't have take a function parameter now?

 > I guess if we really want to get esoteric and proper, we
 > could say that map doesn't belong to anything but
 > a Functor...

Sure, it's a functor, but we're talking about a specific way
of applying it to an array.

 > > > Date.parse("July 28, 2005") ->  "July 28, 2005".parseDate()
 >
 > > I would have thought that knowing how to parse a date is the
 > > domain of the Date object.
 >
 > Or maybe to the Parsing object?

Well that would be p = new Parser('date'). You may as well
have a Computation object for all computation.

 > Of course I just wanted to express the idea of
 > _everything_ being of the form foo.bar, though I did so
 > poorly on the first go.

I think part of the problem is that Javascript is largely
functional. It has some sort of organizational notation
using {} (I'm avoiding the term 'object' here) which can be
used to simulate the OO style, but I don't think it's OO in
the usual sense. So I'm not sure that everything should be
foo.bar(). It's not a message-passing language.

 > > > //Number.NaN makes as much sense to me as Number.7
 > > > Number.NaN  ->  NaN
 >
 > > Or Math.PI?
 >
 > Indeed

I've lost track of the argument now :-) --Antony

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


Thread

Objects comparaison ? unbewusst.sein@fai.invalid (Une Bévue) - 2011-10-13 20:20 +0200
  Re: Objects comparaison ? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2011-10-13 21:47 +0300
    Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-13 21:21 +0200
      Re: Objects comparaison ? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2011-10-13 22:40 +0300
        Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-13 21:46 +0200
          Re: Objects comparaison ? dhtml <dhtmlkitchen@gmail.com> - 2011-10-13 13:11 -0700
            Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-14 01:26 +0200
              Re: Objects comparaison ? dhtml <dhtmlkitchen@gmail.com> - 2011-10-14 12:41 -0700
                Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-15 21:37 +0200
                Re: Objects comparaison ? Antony Scriven <adscriven@gmail.com> - 2011-10-15 15:51 -0700
                Re: Objects comparaison ? dhtml <dhtmlkitchen@gmail.com> - 2011-10-15 21:28 -0700
                Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-16 11:41 +0200
                Re: Objects comparaison ? dhtml <dhtmlkitchen@gmail.com> - 2011-10-16 09:05 -0700
                Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-16 21:59 +0200
                Re: Objects comparaison ? John G Harris <john@nospam.demon.co.uk> - 2011-10-17 10:53 +0100
                Re: Objects comparaison ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-17 07:02 -0700
                Re: Objects comparaison ? Andreas Bergmaier <andber93@web.de> - 2011-10-17 16:27 +0200
                Re: Objects comparaison ? dhtml <dhtmlkitchen@gmail.com> - 2011-10-17 21:28 -0700
                Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-18 11:12 +0200
                Re: Objects comparaison ? John G Harris <john@nospam.demon.co.uk> - 2011-10-18 15:23 +0100
                Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-18 19:48 +0200
                Re: Objects comparaison ? John G Harris <john@nospam.demon.co.uk> - 2011-10-19 17:08 +0100
                Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-20 23:58 +0200
                Re: Objects comparaison ? Antony Scriven <adscriven@gmail.com> - 2011-10-20 15:46 -0700
                Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-18 10:55 +0200
                Re: Objects comparaison ? John G Harris <john@nospam.demon.co.uk> - 2011-10-18 15:59 +0100
                Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-18 19:33 +0200
                Re: Objects comparaison ? Scott Sauyet <scott.sauyet@gmail.com> - 2011-10-18 14:05 -0700
                Re: Objects comparaison ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-18 16:51 -0700
                Re: Objects comparaison ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-18 17:21 -0700
                Re: Objects comparaison ? Scott Sauyet <scott.sauyet@gmail.com> - 2011-10-19 04:40 -0700
                Re: Objects comparaison ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-19 16:41 -0700
                Re: Objects comparaison ? Antony Scriven <adscriven@gmail.com> - 2011-10-19 17:14 -0700
                Re: Objects comparaison ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-19 18:33 -0700
                Re: Objects comparaison ? Scott Sauyet <scott.sauyet@gmail.com> - 2011-10-23 11:43 -0700
                Re: Objects comparaison ? Antony Scriven <adscriven@gmail.com> - 2011-10-19 15:32 -0700
                Re: Objects comparaison ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-19 16:54 -0700
                Re: Objects comparaison ? Antony Scriven <adscriven@gmail.com> - 2011-10-19 17:32 -0700
                Re: Objects comparaison ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-19 18:39 -0700
                Re: Objects comparaison ? John G Harris <john@nospam.demon.co.uk> - 2011-10-19 16:32 +0100
                Re: Objects comparaison ? Scott Sauyet <scott.sauyet@gmail.com> - 2011-10-19 14:18 -0700
                Re: Objects comparaison ? Antony Scriven <adscriven@gmail.com> - 2011-10-19 15:46 -0700
                Objects comparison ? John G Harris <john@nospam.demon.co.uk> - 2011-10-20 16:28 +0100
                Re: Objects comparison ? Antony Scriven <adscriven@gmail.com> - 2011-10-20 12:23 -0700
                Re: Objects comparison ? Antony Scriven <adscriven@gmail.com> - 2011-10-20 15:04 -0700
                Re: Objects comparison ? John G Harris <john@nospam.demon.co.uk> - 2011-10-21 15:38 +0100
                Re: Objects comparison ? Andreas Bergmaier <andber93@web.de> - 2011-10-22 19:40 +0200
                Re: Objects comparison ? John G Harris <john@nospam.demon.co.uk> - 2011-10-23 11:49 +0100
                Re: Objects comparison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-24 19:00 +0200
                Re: Objects comparison ? Scott Sauyet <scott.sauyet@gmail.com> - 2011-10-21 05:29 -0700
                Re: Objects comparison ? John G Harris <john@nospam.demon.co.uk> - 2011-10-21 16:30 +0100
            Re: Objects comparaison ? Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2011-10-18 18:06 +0300
              Re: Objects comparaison ? Jake Jarvis <pig_in_shoes@yahoo.com> - 2011-10-18 17:43 +0200
      Re: Objects comparaison ? unbewusst.sein@fai.invalid (Une Bévue) - 2011-10-14 06:11 +0200
        Re: Objects comparaison ? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2011-10-14 08:07 +0300
          Re: Objects comparaison ? unbewusst.sein@fai.invalid (Une Bévue) - 2011-10-14 07:31 +0200
            Re: Objects comparaison ? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2011-10-14 08:59 +0300
              Re: Objects comparaison ? unbewusst.sein@fai.invalid (Une Bévue) - 2011-10-14 08:36 +0200
        Re: Objects comparaison ? unbewusst.sein@fai.invalid (Une Bévue) - 2011-10-14 08:35 +0200

csiph-web