[OpenLayers-Dev] {} or new Object()
Erik Uzureau
erik.uzureau at metacarta.com
Tue Jul 24 16:30:55 EDT 2007
For the sake of argument, yes they are completely equivalent
*functionaly*, but in terms of readability, new Object() and new
Array() I think have the upper hand.
I'm not really emotional one way or the other though. I'm much more in
favor of just being standard about things.
On 7/24/07, Jeff Yutzler <jeff.yutzler at ionicenterprise.com> wrote:
> I vote for {} and [] rather than new Object() and new Array().
> They are completely equivalent so I see no reason not to use the shorter
> one.
>
> dev-request at openlayers.org wrote:
> > Message: 1
> > Date: Tue, 24 Jul 2007 14:43:09 -0500
> > From: "Erik Uzureau" <erik.uzureau at metacarta.com>
> > Subject: [OpenLayers-Dev] {} or new Object()
> > To: "dev at openlayers" <dev at openlayers.org>
> > Message-ID:
> > <6ae3fb590707241243m4f03d543x26cc524fd4a0197d at mail.gmail.com>
> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> >
> > Paul has just gone vocal with his preference for using {} instead of
> > "new Object()" for the instantantiation of a new object.
> >
> > We do not currently have any policy for this. Do people feel strongly
> > one way or the other?
> >
> > Obviously it's not a big issue, but if there is broad support for
> > doing it one way or the other, we might as well attempt to standardize
> > a bit.
> >
> > Erik
> >
> >
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>
>
>
More information about the Dev
mailing list