>
> For implementing the actual resource bundle loading, RequireJS also offers
> a mechanism <http://requirejs.org/docs/api.html#i18n>.


You're right! I totally forgot!

Another thing, is that one can use r.js to pipe the require minification
process into the closure compiler so you're supposed to get the best of
both worlds...

2012/12/21 Frank Wienberg <fr...@jangaroo.net>

> On Fri, Dec 21, 2012 at 12:53 AM, Kevin Newman <capta...@unfocus.com>
> wrote:
>
> > I wonder if you could use the second argument of Object.create to reduce
> > the number of times Object.defineProperties appears in the source (and if
> > it would matter at all).
> >
> > // Example where we create an object with a couple of sample properties.
> > // (Note that the second parameter maps keys to *property descriptors*.)
> > o = Object.create(Object.**prototype, {
> >   // foo is a regular "value property"
> >   foo: { writable:true, configurable:true, value: "hello" },
> >   // bar is a getter-and-setter (accessor) property
> >   bar: {
> >     configurable: false,
> >     get: function() { return 10 },
> >     set: function(value) { console.log("Setting `o.bar` to", value) }
> > }})
> >
> >
> > Kevin N.
> >
> >
> Yes, completely forgot about that.
> May really make the defineClass() code even more concise--I'll have a go on
> this.
> I'd wouldn't expect a performance impact, though. As mentioned before,
> property structure set-up is only done only once for each class.
>
> -Frank-
>

Reply via email to