Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #7577
| From | Antony Scriven <adscriven@gmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Objects comparaison ? |
| Date | 2011-10-19 17:14 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <f7c63000-087f-4228-a960-60dac143bb8b@n13g2000vbv.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> <7456f8c2-ee81-4d3d-a7df-f452f0a6e62b@t10g2000yqd.googlegroups.com> <b954ae6d-0b32-442d-b549-1bc1994eb48b@w23g2000vbx.googlegroups.com> |
On Oct 20, 12:41 am, "Michael Haufe (TNO)" wrote:
> [...]
>
> My issue is the organization of the language, and adding all of
these
> static members doesn't help. [...]
Gah, I'm probably starting to sound like Thomas Lahn, but
they're not static! I know what you mean though.
> A better organization the language should have strived
> for is to embrace more of its SmallTalk/Self background
> than some type of mixture of half-assed functional.
Hmm, Smalltalk was strongly influenced by Lisp:
http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/doc_kay_oop_en
> 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.
> 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?
> 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().
> [...]
>
> 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.
> 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?
> (and the backwards
> compatibility demon of course).
Yes, that does make things awkward.
> 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'!) 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.
> 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.
> 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.
> What methods go where and their behavior is less
> important in relation to having a consistent means of
> expressing code. I could ramble on, but this is a topic
> better suited to a blog entry or a separate thread*
> methinks. Things are getting off-topic enough already.
> Enough with my droning.
>
> *No doubt someone will jump on my use of the word
> "thread" here...
Separate threads don't seem to be a feature in
comp.lang.javascript. :-) --Antony
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