Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #7579
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Objects comparaison ? |
| Date | 2011-10-19 18:33 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <dbdb4068-590c-4e6b-b933-4f4eb60960b7@c1g2000vbw.googlegroups.com> (permalink) |
| References | (9 earlier) <07b4ce23-b2f9-4412-a50c-42f0043f8bc0@m4g2000yqm.googlegroups.com> <13cf344d-d143-4515-8170-9cf46a8c1cde@m1g2000vbm.googlegroups.com> <7456f8c2-ee81-4d3d-a7df-f452f0a6e62b@t10g2000yqd.googlegroups.com> <b954ae6d-0b32-442d-b549-1bc1994eb48b@w23g2000vbx.googlegroups.com> <f7c63000-087f-4228-a960-60dac143bb8b@n13g2000vbv.googlegroups.com> |
On Oct 19, 7:14 pm, Antony Scriven <adscri...@gmail.com> wrote:
> On Oct 20, 12:41 am, "Michael Haufe (TNO)" wrote:
> Gah, I'm probably starting to sound like Thomas Lahn, but
> they're not static! I know what you mean though.
You're right of course. I should have used "static".
> Hmm, Smalltalk was strongly influenced by Lisp:http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/doc_kay_oop_en
For whatever that is worth in itself. I put more value in the change
of perspective over the lineage.
> > I feel it sits in an awkward place between the two (plus
> > Java syntax didn't help of course).
>
> Only because of its target audience, I believe it was originally
> implemented as a Scheme interpreter.
I think I recall /be saying as much
> > Sure, it has first-class functions, but you can't write
> > true functional code as any ML/Lisp family programmer
> > will tell you.
>
> In what sense?
Idiomatically. Abstraction aren't built with function composition,
recursion is rarely used, and this isn't an expression language.
Faking it or trying it will get you punished generally with bad
performance and/or unreadable code.
> > OO is also awkward due to verbosity and not everything
> > being an object. In comparison to its relatives, the
> > layout of the inheritance model is pretty slapdash due to
> > its history.
>
> That's why we now have Object.create().
I don't see how it relates. It doesn't reduce verbosity, it is slower,
and has no effect on the existing organization.
> > So IME, populating Object, Number, and so on with more
> > and more static members is a perpetuation of design
> > smell.
>
> They're anything but static. I do get the impression you're
> thinking in class-based terms.
s/static/"static" as mentioned above
> > The objects are being treated like namespaces or generic
> > placeholders for things the awkward language organization
> > disallowed putting elsewhere
>
> There are probably mistakes there as you say. But objects
> hold stuff. And functions are first class stuff in
> javascript. How could you not have a placeholder holding
> stuff in a prototypal language?
Nothing "holds" 'while' or 'if' or 'for' nor do they fall under your
definition of "first class stuff" so yes there are awkward bits. I
think you misunderstand though; I am not implying that there should be
objects which have nothing related to them (they would have no reason
to exist then). It is an organization choice that could be made
better.
> > We have Object.create, soon maybe Function.create and
> > Array.create according to the mailing-list. Do these not
> > bother you?
>
> What's the point of Function.create? (And don't say 'to create
> a function'!)
To create a function: <http://goo.gl/JJbN1>
> The point of Object.create is not so much to
> create a new object (you can do that already with {}), but to
> set up the prototype chain.
I think it is more about the meta properties than the prototype.
Constructors did just fine.
> > Why Date.parse instead of new Date?
>
> Because 'new' is for class-based languages?
>
> > Why not new Json(...)? Each of these are rhetorical
> > questions in themselves, but taken as a whole I think the
> > issue is clear.
>
> Sorry, I don't see the issue. Rather I see more of an issue
> with having 'new' at all.
The lack of consistency in creating objects being the issue.
> > On to my off-the-cuff code examples: If the language
> > hypothetically decided to embrace its OO roots and clean
> > up the inheritance model things may look similar to some
> > of the examples, more specifically the concept of
> > "specificObjectType.releventMember".
>
> Yes, but there's more than one OO (or inheritance) model.
Prototypical of course.
> Separate threads don't seem to be a feature in
> comp.lang.javascript. :-)
Maybe I'll ask Google Groups to implement them next to the Spam link...
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar
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