be the reserved label name for use strict
activation.
What do you think?
Best Regards,
Andrea Giammarchi
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
with randomly
extended native prototypes.
Regards,
Andrea Giammarchi
On Sat, Oct 2, 2010 at 11:05 PM, Dmitry A. Soshnikov
dmitry.soshni...@gmail.com wrote:
On 03.10.2010 0:58, Dmitry A. Soshnikov wrote:
On 03.10.2010 0:51, Brendan Eich wrote:
On Oct 2, 2010, at 6:49 AM, Jorge wrote:
On 02
I don't know man, I kinda like the possibility, but I am pretty sure we
gonna end up trying to figure out via weird tricks if an Array is a native
one or not (e.g. Array.isReallyAnArray(obj)) ... however, it's good to have
more power than less ;-)
Regards,
Andrea Giammarchi
On Sun, Oct 3
glad somebody said that!
Also I would pollute performance oriented methods rather than whatever
framework sugar anybody could easily add where unique() and remove(all) may
be part of these cases while fill() could be superfluous.
Andrea
On Mon, Jul 11, 2011 at 6:01 PM, Allen Wirfs-Brock
I may be late here, but what's wrong with
firstArray = firstArray.concat(secondArray); ?
If there are still problems I would say no magic method can solve them,
isn't it?
On Fri, Jul 29, 2011 at 1:59 AM, Jeff Walden jwalden...@mit.edu wrote:
On 07/27/2011 01:26 PM, John-David Dalton wrote:
the pushAll I wonder if concat does not do already exactly what you
are looking for, as I wrote in the other thread.
Best Regards,
Andrea Giammarchi
On Mon, Jul 25, 2011 at 10:17 PM, Jeff Walden jwalden...@mit.edu wrote:
It's perhaps worth noting that this problem also occurs
*
... there I would never complain about a Vec3Array with a multiply(Vec3)
native method for sure!
On Tue, Jul 26, 2011 at 7:59 PM, Alex Russell a...@dojotoolkit.org wrote:
On Jul 26, 2011, at 7:10 AM, Andrea Giammarchi wrote:
glad somebody said that!
Also I would pollute performance oriented
:
On 07/29/2011 05:22 AM, Andrea Giammarchi wrote:
to avoid apply limits is actually trivial
More or less, yes.
But it requires the developer to anticipate the concern in advance that the
elements being appended might consume all available stack space. I don't
think most developers think
and
performances speaking it looks like an epic fail so far and please feel free
to correct me as much as possible, thanks.
Best Regards,
Andrea Giammarchi
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es
)
Please let me understand how this can be a solution in therms of
performances, thanks.
Best Regards,
Andrea Giammarchi
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
I bet devs will do the same if that will land in
JS.
I will file the bench at mozilla soon, thanks.
On Sat, Sep 17, 2011 at 8:43 PM, Brendan Eich bren...@mozilla.com wrote:
On Sep 17, 2011, at 2:34 PM, Andrea Giammarchi wrote:
Also I have explicitly slowed down the logic creating a classic
purposes ?
What would you expect from a namespace.Array constructor if not something
similar or exactly the Array constructor we are all familiar with ?
On Sat, Sep 17, 2011 at 8:54 PM, Sam Tobin-Hochstadt sa...@ccs.neu.eduwrote:
On Sat, Sep 17, 2011 at 2:34 PM, Andrea Giammarchi
, Brendan Eich bren...@mozilla.com wrote:
On Sep 17, 2011, at 10:34 PM, Andrea Giammarchi wrote:
Brendan I wrote I did it on purpose trying to predict what JS devs will
do once JS.next will bring ctypes like syntax.
My objection is that you're confounding test2 by adding object literal
overhead
from js-ctypes in therms of raw performances boost
On Sun, Sep 18, 2011 at 6:05 AM, Brendan Eich bren...@mozilla.com wrote:
On Sep 17, 2011, at 10:39 PM, Andrea Giammarchi wrote:
Can we at least agree that if some extension brings *exactly* same
constructor name, StructType and ArrayType
On Sun, Sep 18, 2011 at 6:07 AM, Brendan Eich bren...@mozilla.com wrote:
Binary data does no such thing! The descriptors are per generated
type-constructor, not per instance.
once you define a StructType how do create an instance ?
new Point2D({x: 0, y: 0});
or binary data can create
, at
least it is possible.
How did the performance change?
in my Mac 13ms VS 16ms surely more if I use the Atom based Netbook
Best Regards,
Andrea Giammarchi
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es
On Sun, Sep 18, 2011 at 7:17 AM, Brendan Eich bren...@mozilla.com wrote:
The point is that you don't *have* to pass a fresh object literal to each
constructor call.
/be
I know Brendan, my point is that I can predict devs will do every time
we'll see
Thanks for other reply, I thought
object as function argument to obtain similar behavior
fn({a: 1, b: 2})
and back to the too many objects created due lack of defaults/named
arguments trap ...
Never mind, this is not for this thread.
Best Regards,
Andrea Giammarchi
On Sun, Sep 18, 2011 at 3:14 PM, Brendan Eich bren
PM, Brendan Eich bren...@mozilla.com wrote:
On Sep 18, 2011, at 12:09 PM, Andrea Giammarchi wrote:
I know it's the same, for this reason I said it was shimmable
New syntax would be fine as long as minifiers won't break everything so ...
as long as minifiers are compatible
-brendan-here-was-my-question.html
I would like to thank you in advance for your time and all possible
answers/considerations/questions you may come up with.
Cheers,
Andrea Giammarchi
___
es-discuss mailing list
es-discuss@mozilla.org
https
changes, will take years before it can be widely adopted and improved, and
these years in between will put JavaScript into an even worse position where
JS developers will ask themselves: what is exactly JavaScript ?
Thanks in any case for your answer.
Best Regards,
Andrea Giammarchi
On Tue
, thanks.
br,
WebReflection
On Tue, Oct 4, 2011 at 3:16 PM, David Bruant david.bru...@labri.fr wrote:
Le 03/10/2011 22:49, Andrea Giammarchi a écrit :
Dear All,
while I had the opportunity to ask directly to Brendan Eich this
question, I would like to ask you 5 minutes of your
)
;
var hasOwnProperty = bind(invoke, {}.hasOwnProperty);
hasOwnProperty({key:1}, key); // true
call([].slice, [1,2,3], 1); // 2,3
apply([].slice, [1,2,3], [1]); // 2,3
Regards,
Andrea Giammarchi
___
es-discuss mailing list
es-discuss@mozilla.org
Here again I am not sure how we ended up with this conversation but you can
find a function able to extract properties and methods out of a generic
object:
https://gist.github.com/1264775
It works with jQuery too, as well as arrays, etc etc
Regards,
Andrea Giammarchi
:
On Wed, Oct 5, 2011 at 11:48 AM, Andrea Giammarchi
andrea.giammar...@gmail.com wrote:
Here again I am not sure how we ended up with this conversation but you
can
find a function able to extract properties and methods out of a generic
object:
https://gist.github.com/1264775
It works
Sorry Russ, I am not sure I got it
On Wed, Oct 5, 2011 at 6:14 PM, Russell Leggett
russell.legg...@gmail.comwrote:
On Wed, Oct 5, 2011 at 12:04 PM, Andrea Giammarchi
andrea.giammar...@gmail.com wrote:
with such dynamic language I would never trust much AST
This is for realtime, inline
as Zend Certified Engineer I can say == and === have never been a problem
... also there are cases when I *want* coercion!
var False = new Boolean(false);
if (False) alert(You may say WTF);
if (False == false) alert(I may say feature);
Best Regards,
Andrea Giammarchi
something like this ? ...
(function () {
function dispatch(callback) {
callback.call(this.r, this.e);
}
function add(callback) {
this.handlers.indexOf(callback) 0
this.handlers.push(callback);
}
function remove(callback) {
var i = this.handlers.indexOf(callback);
-1 i
... apologies
On Sat, Oct 15, 2011 at 7:44 PM, David Bruant bruan...@gmail.com wrote:
Le 15/10/2011 18:26, Andrea Giammarchi a écrit :
something like this ? ...
My email client says that you're responding to my initial message, but you
may as well be responding to my concern about
with variable event solved
});
};
var o = Object.asEmitter(Object.create(null));
o.on.whatever.add(callback);
o.on.whatever({type: whatever});
br
On Sat, Oct 15, 2011 at 8:19 PM, David Bruant bruan...@gmail.com wrote:
Le 15/10/2011 19:52, Andrea Giammarchi a écrit :
naaa, event is just
Just because in this ml there are many engineers involved in JS engines
optimizations ... this is a what if... post, feel free to comment it or
hopefully take some hint out of it:
http://webreflection.blogspot.com/2011/10/missing-tool-in-scripting-world.html
Best Regards
with this note ?
Thanks
On Sun, Oct 16, 2011 at 3:23 PM, Sam Tobin-Hochstadt sa...@ccs.neu.eduwrote:
On Sun, Oct 16, 2011 at 8:52 AM, Andrea Giammarchi
andrea.giammar...@gmail.com wrote:
Just because in this ml there are many engineers involved in JS engines
optimizations ... this is a what if... post
for subsequent use on multiple
underlying architectures.
*From: *Andrea Giammarchi andrea.giammar...@gmail.com
*Subject: **The Missing Tool In Scripting World*
*Date: *October 16, 2011 14:52:47 GMT+02:00
*To: *es-discuss@mozilla.org es-discuss@mozilla.org
Just because in this ml
code ... AFAIK not possible right now
On Sun, Oct 16, 2011 at 9:15 PM, Sam Tobin-Hochstadt sa...@ccs.neu.eduwrote:
On Sun, Oct 16, 2011 at 12:05 PM, Andrea Giammarchi
andrea.giammar...@gmail.com wrote:
not natively, and not in the optimized way C or C++ do
This is not correct -- SBCL
In webkit nightly not even the getter gets invoked.
On Tue, Oct 18, 2011 at 9:31 PM, felix feli...@gmail.com wrote:
If I define a setter for Array.prototype[0], does [].push invoke that
setter?
Test code:
!doctype htmlhtmlbody
script
Object.defineProperty(
Array.prototype, 0,
{
= 0;
a.push = [].push;
alert('before push a[0] = ' + a[0]);
a.push(44);
alert('after push a[0] = ' + a[0]);
On Mon, Oct 24, 2011 at 4:12 PM, Andrea Giammarchi
andrea.giammar...@gmail.com wrote:
In webkit nightly not even the getter gets invoked.
On Tue, Oct 18, 2011 at 9:31 PM, felix feli
?
Best Regards,
Andrea Giammarchi
On Mon, Oct 24, 2011 at 8:42 PM, Axel Rauschmayer a...@rauschma.de wrote:
FWIW: I’ve blogged about this.
http://www.2ality.com/2011/10/enums.html
On Oct 3, 2011, at 19:03 , Allen Wirfs-Brock wrote:
Channeling for MarkM, if you use regular objects
;
}(Object, typeof exports == undefined ? this[enum] = {} : exports));
Best Regards,
Andrea Giammarchi
On Mon, Oct 24, 2011 at 11:53 PM, Axel Rauschmayer a...@rauschma.de wrote:
If you don't want Object.prototype (why ?)
do you want an enumerable, configurable, writable constructor ?
I
demonstrated here indeed:
http://jsperf.com/array-extras-second-argument
on average, closures plus scope lookup looks always slower but I'll add more
tests.
On Tue, Oct 25, 2011 at 12:23 AM, Brendan Eich bren...@mozilla.com wrote:
On Oct 24, 2011, at 2:53 PM, Axel Rauschmayer wrote:
that =
advantage for both reusability and, now
demonstrated, performances.
It was nice to test it in any case so thanks.
br,
Andrea Giammarchi
On Tue, Oct 25, 2011 at 12:32 AM, Axel Rauschmayer a...@rauschma.de wrote:
Ah, the array extras use pass the second argument
yes, even if in a non RequireJS world accessing Enum constructor via
enums.Enum does not sound right to me
On Tue, Oct 25, 2011 at 12:51 AM, Axel Rauschmayer a...@rauschma.de wrote:
Please consider this.enum break all minifiers since enum is a reserved
word, I had to do this[enum] = {} at the
I work on mobile browsers ... things are up to 1000 times slower there and
all tricks, as long as still readable, are welcome in my daily basis work.
Best Regards,
Andrea Giammarchi
On Tue, Oct 25, 2011 at 1:35 AM, Axel Rauschmayer a...@rauschma.de wrote:
it must be said the pattern I
I am not sure I am missing something but I think arguments could disappear
without problems, being easily simulated like this:
function f1(...arguments) {
f2.apply(this, arguments);
f2(...arguments);
let [a,b,c,...rest] = arguments;
// etc etc
}
Am I wrong ?
br
On Wed, Oct 26,
point 1 is utopia since ...varname breaks syntax in any case
second point would be easier like this ?
function (arg1obj={a,b,c}, p=[x,y]) {
}
On Wed, Oct 26, 2011 at 8:27 PM, Allen Wirfs-Brock al...@wirfs-brock.comwrote:
1) arguments is needed for backwards compatability (no migration tax)
I think the main reason to have a FormatComponent is to give each
DateTimeFormat instance a configuration state so that once you define it
you can format it automatically any time you print it out.
Said that, I am familiar as example with gmdate() PHP function or similar
string syntax as it could
);
}
};
SomeSubClass.prototype.genericMethod = genericMethod;
Thanks for any sort of clarification.
Best Regards,
Andrea Giammarchi
On Sat, Oct 29, 2011 at 5:45 AM, Brendan Eich bren...@mozilla.com wrote:
On Oct 28, 2011, at 8:23 PM, Axel Rauschmayer wrote:
The ES.next version is quite nice:
[Snip]
I have to say
();
};
Entity.prototype.hasPoint = false;
(new Entity).setPoint(1, 2, 3).isPositive(); // boom ? or super is bound to
Point ?
br,
Andrea Giammarchi
On Sat, Oct 29, 2011 at 2:25 PM, Axel Rauschmayer a...@rauschma.de wrote:
Summary: true generic |super| hardly ever makes sense. Do you have
I sai the example was crap indeed and it doe not matter what it does but
how and there is a super call.
Will super be assigned runtime or fixed in method creation ?
On Sat, Oct 29, 2011 at 4:09 PM, Axel Rauschmayer a...@rauschma.de wrote:
Sorry for sounding harsh, but I’m really just curious:
Let's say this is an attempt to bring some new, easy to implement, method
for the native Object.prototype
Specially about forEach, the most used Array.prototype method out there,
it's quite clear JS developers would like to have similar method to iterate
over objects, as key:value pairs rather
gazhe...@gmail.com wrote:
On 1 December 2011 07:47, Andrea Giammarchi
andrea.giammar...@gmail.comwrote:
Let's say this is an attempt to bring some new, easy to implement, method
for the native Object.prototype
Specially about forEach, the most used Array.prototype method out there,
it's quite
... iterators not backward compatible ... a failing solution for me for
this very simple and common problem :-/
On Thu, Dec 1, 2011 at 2:04 PM, David Bruant bruan...@gmail.com wrote:
Le 01/12/2011 08:47, Andrea Giammarchi a écrit :
Let's say this is an attempt to bring some new, easy
nothing wrong, that's basically what I do indeed as
Object.prototype.forEach but it would be faster done natively
On Thu, Dec 1, 2011 at 7:00 PM, Brendan Eich bren...@mozilla.com wrote:
On Dec 1, 2011, at 8:00 AM, Andrea Giammarchi wrote:
... iterators not backward compatible ... a failing
you don't use apply randomly, you use apply for methods or getters knowing
there is a function there.
__noSuchMethod__ is about NOT HAVING A FUNCTION there and if the property
is not defined apply should fail as well as obj.undefined.apply would
I still do not understand why we keep mixing up
sorry for the typo, this point was
1.2.2.1 yes, invoke that callback via cb.call(object, *methodName*,
arguments)
On Fri, Dec 16, 2011 at 5:30 PM, Andrea Giammarchi
andrea.giammar...@gmail.com wrote:
you don't use apply randomly, you use apply for methods or getters knowing
-
From: Andrea Giammarchi andrea.giammar...@gmail.com
To: Dmitry Soshnikov dmitry.soshni...@gmail.com
Cc: Brendan Eich bren...@mozilla.com, es-discuss
es-discuss@mozilla.org
Sent: Friday, December 16, 2011 8:30:47 AM
Subject: Re: noSuchMethod: funargs + invoke-only-phantoms
you don't
Dmitry, addressing a trap fallback is not a good idea plus the average JS
coder rarely does it ... said that, the moment you are using a method you
already know this exists so you already know the documentation ( or part of
it ) so I don't see much hurt there.
Moreover, the addressing problem is
and about last point, maybe objects that implements noSuchMethod should
return something like unknown via typeof ... just saying, and simply to
differentiate these objects from others where __noSuchMethod__ is not in
place.
On Sat, Dec 17, 2011 at 3:08 PM, Andrea Giammarchi
andrea.giammar
This is almost the exact behavior I was talking about ...
Object.withNoSuchMethod = function withNoSuchMethod(obj, __noSuchMethod__) {
var cachedInvokes = {};
return Proxy.create({
get: function (receiver, name) {
return name in obj ?
obj[name] :
) === sameObject.asContextOf(
genericCallback)
Here the whole post with better examples plus the proposed solution that
would be nice to have in JS.Next
http://webreflection.blogspot.com/2012/01/improving-functionprototypebind.html
Best Regards,
Andrea Giammarchi
___
es
:
On Jan 5, 2012, at 14:54 , Andrea Giammarchi wrote:
Here the whole post with better examples plus the proposed solution that
would be nice to have in JS.Next
http://webreflection.blogspot.com/2012/01/improving-functionprototypebind.html
I don’t use bound() and function expressions very often (I
,
Andrea Giammarchi
On Thu, Jan 5, 2012 at 5:11 PM, Axel Rauschmayer a...@rauschma.de wrote:
that would not solve much 'cause you can bind a function to a single
object and no more.
Isn’t that the most frequent use case? Do you have examples where you bind
the same function to several
over what I propose?
David
[1] https://gist.github.com/1567494
Le 05/01/2012 14:54, Andrea Giammarchi a écrit :
I have thought it may be interesting to receive some comment here too ...
so here the short summary:
genericCallback.bind(sameObject) !== genericCallback.bind(sameObject
Guys, by any chance we can go back into the topic?
I was not thinking about changing the meaning of this in a function, also
Python sends explicit self context as first argument so things are slightly
different in any case
Point is:
- bind was one of the most needed/used Function.prototype
wrote in his last reply could
not happen ... everything will work as expected.
Any better ?
I can try to explain even more, if necessary, or provide better
specifications aligned with current ES5 terminology
Best Regards,
Andrea Giammarchi
P.S. is it really just me that see the problem
same thing this does
var bound = Object.bind(Object);
bound.foo = capabilityBobShouldntGet; // who does this ?
var HAH = bound.foo;
... so I am missing your point I guess ... but my proposal wants to return
always same object for 99.9% of usage out there ...
On Fri, Jan 6, 2012 at 8:55 AM,
boundFunction and store it into objToBind.[[boundFunctions]]
- return the newly created boundFunction
Would that be possible?
François
-Message d'origine- From: Brendan Eich
Sent: Friday, January 06, 2012 2:22 AM
To: Andrea Giammarchi
Cc: Axel Rauschmayer ; François REMY ; es
On Fri, Jan 6, 2012 at 10:50 AM, David Bruant bruan...@gmail.com wrote:
Your proposal won't be implemented in older browsers. Actually, it is very
likely that your proposal would be implemented in browsers that would
already have weak maps.
Under these conditions. What is the benefit of a
it doesn't ... as soon as you release the reference to o no leaks persists
but of course until you keep o on hold those unique callbacks cannot be
released ... but this would be true with WeakMap too, isn't it?
In any case, boundTo is suitable for listeners and the whole point is to do
not hold
libraries ...
but if this is the logic, I wonder what is ES5 about with all its extras (
Array, Function, String, etc )
Regards
On Fri, Jan 6, 2012 at 12:42 PM, David Bruant bruan...@gmail.com wrote:
Le 06/01/2012 12:23, Andrea Giammarchi a écrit :
it doesn't ... as soon as you release
= object.method.bind(object);
Above pattern is able to destroy entire framework but nobody ever
complained ... well, glad to be the first one.
br
On Fri, Jan 6, 2012 at 4:23 PM, David Bruant bruan...@gmail.com wrote:
Le 06/01/2012 12:51, Andrea Giammarchi a écrit :
unreachable without reference count? do you
:
On Fri, Jan 6, 2012 at 1:50 AM, David Bruant bruan...@gmail.com wrote:
Le 06/01/2012 10:40, Andrea Giammarchi a écrit :
if WeakMaps are so smart ... it means we cannot shim them without causing
leaks in non WeakMap ready browsers since no magic will happen,objects as
keys will simply be persistent
On Fri, Jan 6, 2012 at 6:56 PM, Mark S. Miller erig...@google.com wrote:
On Fri, Jan 6, 2012 at 9:27 AM, Andrea Giammarchi
andrea.giammar...@gmail.com wrote:
that whole variable can be redefined or used as communication channel ...
I really don't understand what is the problem
Maybe interesting for others too, since we talked about WeakMap a lot in
this thread:
My essential polyfill here:
https://gist.github.com/1571878
100% code coverage here:
https://gist.github.com/1571887
Best Regards,
Andrea Giammarchi
___
es
I would be more than happy to go on with libraries first approach as long
as we don't have to wait 6 years before a needed feature is going to be
considered.
I have also raised the problem because it is in my opinion underestimated
but mainly because I would like to avoid the fragmentation of
indeed ... inline functions are problem number 2, anonymous or not, unless
the removeEventListener is not performed inside the function itself so that
at least the function name could be reused while if anonymous and use
strict is in place there's no way to know which function is it.
However, two
just to make it more concrete for those interested:
http://webreflection.blogspot.com/2012/01/introducing-objecthandler.html
IDL Like description and code ... to me this is a much faster/easier/better
solution than Function#bind ... unshimmable for IE 9 but ... you know,
some wrapper could do
I believe when we talk about lambda here, we don't exactly mean addressable
anonymous functions :-)
# python lambda
g = lambda x: x*x
g(8) # 64
// JS lambda
function lambda(exp) {
var body = exp.split(:);
return Function(body[0], return + body.slice(1).join(:));
}
var g = lambda(x: x*x);
I have posted about a better approach to load modules too talking about
an early state library that already works like a charm:
http://webreflection.blogspot.com/2012/01/y-u-no-use-libraries-and-add-stuff.html
AMD is good in theory but as far as I can see it fails miserably when it
comes to JS
You are underlying my points too .. I am dealing on daily basis with highly
dependent little modules and the build procedure takes care of packing
everything together before deployment.
However, we are using a synchronous version of require, similar to the one
used in node.js but that does not
now I am ... thanks for those links, requires optimizer seems already good
enough as cross-platform concept
br
On Mon, Jan 16, 2012 at 9:01 PM, Axel Rauschmayer a...@rauschma.de wrote:
@Andrea, Mariusz: Are you aware of the RequireJS optimizer [1]? It can be
used together with almond [2], an
I would also say that if you can carry both the keyObject and its
defaultValue with you all the time you may not need at all to store it as
weak map ... looks to me you are missing the point where the relation
should be created, using the get() as generic action/entry point to do that.
I believe
then the method should be called *getOrSetIfNotThere(obj, def)* 'cause
get() would mislead too much
looks to me we are also confusing falsy with undefined ... undefined is
undefined and there's no reason to use a WeakMap to set undefined since I
would expect the WeakMap itself to completely
it's OK, 'cause is not called get ;-)
On Tue, Jan 17, 2012 at 1:46 AM, Kris Kowal kris.ko...@cixar.com wrote:
On Mon, Jan 16, 2012 at 4:39 PM, Andrea Giammarchi
andrea.giammar...@gmail.com wrote:
then the method should be called getOrSetIfNotThere(obj, def) 'cause
get()
would mislead too
Somebody may be interested into ES6 Map, WeakMap, and Set
Here my attempt with all explanations:
https://github.com/WebReflection/es6-collections
The code must work in every browser/JS engine, reasons about weakness
choice listed too.
Now you know, feedbacks welcome
br
On Thu, Jan 19, 2012 at 7:51 AM, Mark S. Miller erig...@google.com wrote:
Everyone on this thread, is there any need expressed in this thread that
is not satisfied by InfiniteMap?
I would say for notification purpose
result = lazyFactory(key, defaultValue);
would be more appropriate
On Thu, Jan 19, 2012 at 6:11 PM, Mark S. Miller erig...@google.com wrote:
That's not quite true in the collection I posted, since an InfiniteMap is
only *initially* total. It still emulates deletes by using tombstones to
poke holes into its initially universal domain. When doing a get at a
for all WeakMap shims and examples I have seen this to guard the key as
object is basically:
Object.isObject = function isObject() {
return Object(value) === value;
};
why such difference with indeed function ambiguity with your first example?
Agreed on Object.type since it's easy to monkey
On Fri, Jan 20, 2012 at 2:24 AM, Herby Vojčík he...@mailbox.sk wrote:
Let the object created is foo. When calling foo.method(), it is accessing
private(foo), not private(objectWithPrivates), since this is foo. If yes
does not happen. Errors may happen since foo probably does not have private
+1 for the returned class ... also if we distinguish between array and
Array then the new Boolean/Number/String case can be covered via
Number, if object, rather than number, which is cool.
Th only weird thing would be object rather than Object, as if its
[[class]] is unknown
br
On Fri, Jan 20,
with postMessage and other standard/secure ways to pass data around the
cross frame problem is slowly disappearing unless it's meant to sandbox the
Array, as example, of that frame.
A classic example is indeed the freedom to extend the way we like a
sandboxed Array which hopefully will never
process.nextTick already landed in browsers, as concept, it's called
setImmediate
http://msdn.microsoft.com/en-us/library/ie/hh673556(v=vs.85).aspx#setimmediate
About Rhino, that implementation is not the equivalent of what we have in
browsers, where the most useful thing ever is rarely used out
random thoughts: it still looks weird to me to prefix undefined and null
with object, plus there is no undefined [[class]], neither Null one so
despite the good intention, I believe null, NaN, and undefined, should
return [not an object] as well as primitives should return [primitive
String] as
var d = new Date, i = setInterval(function () {console.log(new Date - d); d
= new Date;}, 1);
most likely gonna fire a sequence of
10
0
11
0
12
0
10
0
11
0
10
0
... not really reliable, even if delay is specified to 10 o 20, does not
look that consistent
with setTimeout, I have tried delay 3
for what it's worth it ...
Object.defineProperty(Object.prototype, new, {value: function
(descriptor) {
return Object.create(typeof this == function ?
this.prototype :
this,
descriptor || {}
);
}});
Map.new() and Math.new() should both work
my 2 cents
On Mon, Jan 23, 2012 at
Number.prototype.pow = function pow(radix) {
return Math.pow(this, radix);
};
//alert(2.pow(3)); // error, decimal point, not property accessor
alert(2..pow(3)); // 8
alert(NaN.pow(0)); // 1
until numbers are valid as digit. I don't see any advance on using
Number.prototype for anything
until
my point was: no need to have pow in Number.prototype, imo
On Thu, Jan 26, 2012 at 1:40 AM, Allen Wirfs-Brock al...@wirfs-brock.comwrote:
On Jan 25, 2012, at 3:47 PM, Andrea Giammarchi wrote:
Number.prototype.pow = function pow(radix) {
return Math.pow(this, radix);
};
//alert(2.pow(3
it's quite common to send a consistent amount of data in certain
applications and the FORM does not scale here while an Ajax POST or an
upload via binary gripped data would be handy.
It would also be handy to store a bit more data in localStorage, Web SQL (
for those that won't drop it ) and/or
any sort of real time sharing editing/documentation document even to go (3G)
plus I want to shrink those bloody 50Mb of Web SQL or 5Mb of localStorage
limit ... 5Mb ain't nothing for data, we all know that, neither are 50,
while native apps, talking about mobile, get as much as they want with a
it's great to have other developers with me but I wonder if anyone would be
so kind to bring this at next TC39 meeting too, thanks
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
just an UP for this topic ... anyone with other thoughts ?
cheers
On Tue, Jan 31, 2012 at 2:18 AM, Andrea Giammarchi
andrea.giammar...@gmail.com wrote:
any sort of real time sharing editing/documentation document even to go
(3G)
plus I want to shrink those bloody 50Mb of Web SQL or 5Mb
1 - 100 of 1535 matches
Mail list logo