Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #7619
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail |
|---|---|
| From | Andreas Bergmaier <andber93@web.de> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Objects comparison ? |
| Date | Sat, 22 Oct 2011 19:40:14 +0200 |
| Organization | albasani.net |
| Lines | 29 |
| Message-ID | <j7uv5f$qsh$1@news.albasani.net> (permalink) |
| References | <1k93ek2.1xghqcy1upjvv5N%unbewusst.sein@fai.invalid> <2326223.jLKWLtnpvF@PointedEars.de> <e0b407d3-9663-4c23-9863-5969374eaa2d@e37g2000yqa.googlegroups.com> <2065619.34vx2sxqLb@PointedEars.de> <d66a4e0d-c27d-4fcf-9e1d-74e15613d52a@t38g2000prg.googlegroups.com> <2995463.SPkdTlGXAF@PointedEars.de> <b2196b98-93ac-49fc-bca5-61ae8fafee24@r2g2000prh.googlegroups.com> <2314707.NYtdq5378b@PointedEars.de> <XgFvB6Cws$mOFwCZ@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD> <3387139.pT8TNry37f@PointedEars.de> <La6bUfEjRZnOFwLN@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD> <659c944b-9ab1-46e9-a360-dd2b2f373dd4@c1g2000vbw.googlegroups.com> <OEQjhGE91unOFw7A@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD> <bb93a43e-3b89-4e2d-82c6-06904737348d@a12g2000vbz.googlegroups.com> <jux+CjHb4DoOFw1Q@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD> <b163e06f-c679-4d6d-926f-e734d82715a7@x25g2000yqb.googlegroups.com> <ZgTZM9C5PYoOFwjd@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.albasani.net oZC2FqrcuC6gweQ9f8zQPNFWLgU7vZdxXbaolb3lIQjB2CVeK7oU3gurV9oJG2njjw7Vyz21aVNVctUD85n3cBS3hrpdcWO24JaQHJc7HMszBupo8iKTq+f/Y8Y9FFgQ |
| NNTP-Posting-Date | Sat, 22 Oct 2011 17:39:59 +0000 (UTC) |
| Injection-Info | news.albasani.net; logging-data="oOY8HJF71mjZ4TP+m4TJ3RS44wsFZ/ju7rqpCVoTELwAsJoYQ71n0V1gJbiFNbzBE586it0/rWN95rMWz5bj/InqeENDxFgDShDDNJj2M1wnDMnadXX1sSzBQPEyPIJw"; mail-complaints-to="abuse@albasani.net" |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 |
| In-Reply-To | <ZgTZM9C5PYoOFwjd@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD> |
| Cancel-Lock | sha1:pNWD8byD+g8gzt9HdvluX54xfl8= |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.javascript:7619 |
Show key headers only | View raw
John G Harris schrieb:
> On Thu, 20 Oct 2011 at 12:23:02, in comp.lang.javascript, Antony Scriven
> wrote:
>> var t = Thing.make(2057, "left-handed sproggle");
>> var u = Thing.makeclone(t);
>>
>> They're static factory methods if you're looking at this
>> from a the perspective of a class-based language.
>
> Alternatively, in ECMAScript they don't need to be factory methods; they
> can be constructors :
>
> var t = new Thing.make(2057, "left-handed sproggle");
> var u = new Thing.clone(t);
Why should a clone /method/ be a constructor? I'd prefer this:
var t = new Thing(x, y, z);
or maybe
var t = new Thing.maker(x, y, z);
and then
var u = t.clone(); // prototyped, or not to get "private" attributes
or
var u = Thing.clone(t);
so that both t and u are instances of Thing (or Thing.maker).
Andreas
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