Le 20/01/2012 00:54, Brendan Eich a écrit :
David Bruant mailto:bruan...@gmail.com
January 19, 2012 1:15 AM
Le 19/01/2012 02:27, Waldemar Horwat a écrit :
Brendan: Kill typeof null. Replace it with Ojbect.isObject?
What would be the semantics of this?
It was not obvious but the precedent
But notice that throughout this, no one advancing a proposal advocated
freezing by default. JS developers use function objects as mutable
objects. Not just to set .prototype, also to decorate with ad-hoc and
meta-data properties. Freezing is not wanted by default.
Another example: when
On 19/01/2012, at 22:14, Axel Rauschmayer wrote:
Suggestion: a community-edited page where we collect the rejected syntaxes
(= less running in circles) – simply copying emails (such as yours below)
there would probably suffice.
Has a backtick/accent grave ever been considered and/or
Le 20/01/2012 00:57, Brendan Eich a écrit :
David Bruant mailto:bruan...@gmail.com
January 19, 2012 1:43 AM
Every time I've been thinking of an issue like this, the solution
I've found was whoever runs first wins.
This is not relevant to the example I showed.
All in all, regardless of data or
Sorry, misunderstood the question.
Andrea Giammarchi wrote:
On Fri, Jan 20, 2012 at 2:24 AM, Herby Vojčík he...@mailbox.sk
mailto:he...@mailbox.sk wrote:
Let the object created is foo. When calling foo.method(), it is
accessing private(foo), not private(objectWithPrivates), since
Jon Zeppieri wrote:
Is there a version of this desugaring that deals with recursive
bindings in the initializer expression of the loop?
How about something like this?
(given for (let varName = initExpr; testExpr; updateExpr) { body } )
{
let varName = initExpr;
while(true) {
if
I must say you globally got my point (even if, after re-reading it, it wasn't
as clear as I intended). I hope others did, too.
To respond to your questions :
(1) On the usage of the arobase (@) symbol
The @ is used in some languages as a function introductory keyword. Have a
look at the very
A couple of remarks/questions...
On 20 January 2012 01:40, Waldemar Horwat walde...@google.com wrote:
Allen: Do top-level let and const create properties of the global object?
DaveH (channeling Andreas): No, but functions do.
If that is referring to me then there might have been a
From the TC39 notes:
DaveH: What if there are duplicate top-level bindings?
MarkM: Top-level let should behave as much as possible the same as
concatenated scripts.
It's my claim that it is impossible to reconcile all of the following
three goals in a way that is even remotely sane:
1.
Andreas Rossberg wrote:
On 20 January 2012 01:40, Waldemar Horwatwalde...@google.com wrote:
Also, function (e) {let e;} should always be an error.
Is there a good reason to do this? It would be an unnecessary
irregularity with block scoping, and seems like overly nanny-ish (in
stark contrast
On 20 January 2012 09:22, Herby Vojčík he...@mailbox.sk wrote:
+1. I see no point why let e; should not shadow argument e here.
I do. It is a virtual certainty that this form was used accidentally by
the developer, which indicates a flaw in the developer's thinking --
probably due to
On 19 January 2012 23:02, Brendan Eich bren...@mozilla.org wrote:
Yes kids, this means we are going with MarkM's lambda desugaring from:
https://mail.mozilla.org/**pipermail/es-discuss/2008-**October/007819.htmlhttps://mail.mozilla.org/pipermail/es-discuss/2008-October/007819.html
So any
So any closures formed in the body of such a for(let...;...;...) loop will
capture the binding created afresh for that iteration.
Thank you, Lord! \o/Can I get a Hallelujah? \o/
for (i=0; i alerts.length; i++) {
setTimeout(function(i) { return function() { m.add(alerts[i]) }
On Fri, Jan 20, 2012 at 5:55 AM, Andreas Rossberg rossb...@google.comwrote:
[...]
Regarding scope pollution, I think this is best solved by making the
global object be a fresh empty object that has the object containing
all primordials as its prototype.
[...]
very pedantic -- you've been
Andy Wingo mailto:wi...@igalia.com
January 20, 2012 7:43 AM
I had a hard time following the conclusions here. There does seem to
be some uncertainty regarding ES6 features in non-strict code, but is
in strict mode and in modules is this (DaveH's new proposal) the
consensus? Thanks, Andy
I
David Bruant mailto:bruan...@gmail.com
January 20, 2012 12:51 AM
Le 20/01/2012 00:54, Brendan Eich a écrit :
That came up too: Object.type(x) would be the new typeof. But it will
take a while to get adoption, it's not built-in so monkey-patchable etc.
If Object.isObject has the second definition
On Jan 20, 2012, at 6:22 AM, Herby Vojčík wrote:
Andreas Rossberg wrote:
On 20 January 2012 01:40, Waldemar Horwatwalde...@google.com wrote:
Also, function (e) {let e;} should always be an error.
Is there a good reason to do this? It would be an unnecessary
irregularity with block
Object.classOf(x) - Object.prototype.toString.call
(x).slice(8, -1) using the original value of O.p.toString.
Comments?
Including the name of the module that the class comes from might be nice.
We do that for classes implemented in C in GPSEE modules today by being bad
-- we modify
One of the valuable use cases for quasis that we've discussed is multi-line
string literals. It was just pointed out to me that the current proposal page
mentions an open issue which calls into question multi-line string literals and
the exact semantics of them. This is in
This JavaScript pitfall is still mind-boggling to me. It is clear what happens
(each frame has a different copy of Array etc.), but I find it hard to wrap my
mind around the consequences in practice. Is there a plan on how to make this
less painful in the long run? Initially, a cross-frame
Hello,
I think private itself could be used as a shortcut to private(this). It
may look for example like this:
class Foo {
...
leq(other) {
return private.weight = private(other).weight;
}
...
}
It is not unprecedented, there already is a keyword that represents this
as well as
On Jan 20, 2012, at 7:13 AM, Wes Garland wrote:
On 20 January 2012 09:22, Herby Vojčík he...@mailbox.sk wrote:
+1. I see no point why let e; should not shadow argument e here.
I do. It is a virtual certainty that this form was used accidentally by the
developer, which indicates a flaw
2012/1/20 Luke Hoban lu...@microsoft.com:
My feeling is that:
a) Multi-line string literals are important and should be supported in quasis.
b) Trailing whitespace should be allowed and preserved. It is a useful for
quasis to be as literal as possible.
This came up in side conversation at
Allen Wirfs-Brock wrote:
On Jan 20, 2012, at 6:22 AM, Herby Vojčík wrote:
+1. I see no point why let e; should not shadow argument e here.
In general, the binding rules for function parameters were decided at
the Nov. 2011 meeting (see Nov 16 meeting notes):
MarkM: Two-scope model (one
On Fri, Jan 20, 2012 at 9:57 AM, Herby Vojčík he...@mailbox.sk wrote:
Single scope, args are lets view is making sense of this. Ok, thanks.
Another case together with this one seems to force us into Single scope,
args are vars:
function foo(e) { var e ... }
The var e is currently
Jorge mailto:jo...@jorgechamorro.com
January 20, 2012 1:22 AM
Has a backtick/accent grave ever been considered and/or rejected ?
Rejected, that is used by wiki.ecmascript.org/doku.php?id=harmony:quasis
already.
/be
___
es-discuss mailing list
On 20 January 2012 18:26, Allen Wirfs-Brock al...@wirfs-brock.com wrote:
On 20 January 2012 01:40, Waldemar Horwatwalde...@google.com wrote:
Also, function (e) {let e;} should always be an error.
Is there a good reason to do this? It would be an unnecessary
irregularity with block scoping,
On 20 January 2012 18:28, Allen Wirfs-Brock al...@wirfs-brock.com wrote:
On Jan 20, 2012, at 7:13 AM, Wes Garland wrote:
On 20 January 2012 09:22, Herby Vojčík he...@mailbox.sk wrote:
+1. I see no point why let e; should not shadow argument e here.
I do. It is a virtual certainty that
Mark S. Miller mailto:erig...@google.com
January 20, 2012 10:15 AM
On Fri, Jan 20, 2012 at 9:57 AM, Herby Vojčík he...@mailbox.sk
mailto:he...@mailbox.sk wrote:
Single scope, args are lets view is making sense of this. Ok,
thanks.
Another case together with this one seems to force
Andreas Rossberg mailto:rossb...@google.com
January 20, 2012 10:17 AM
Here is a simple model: a function expression introduces one local
scope(*), which contains the parameters and the var variables hoisted
from its body (as in ES5). The function is evaluated by evaluating its
body _as a block_
Let's not bikeshed class private syntax just yet. I mean, we could
(es-discuss, right?) but I don't think it is productive.
And again, we do not want a reified private state object, so private
could not be a free expression. This also hurts private(other).weight --
'weight' is not an
Axel Rauschmayer wrote:
This JavaScript pitfall is still mind-boggling to me. It is clear what
happens (each frame has a different copy of Array etc.), but I find it
hard to wrap my mind around the consequences in practice. Is there a
plan on how to make this less painful in the long run?
Brendan Eich wrote:
And again, we do not want a reified private state object, so private
could not be a free expression. This also hurts private(other).weight --
'weight' is not an identifier in a private state object, it has to be
a private name object binding. Therefore we should avoid any
Herby Vojčík mailto:he...@mailbox.sk
January 20, 2012 10:39 AM
Brendan Eich wrote:
And again, we do not want a reified private state object, so private
could not be a free expression. This also hurts private(other).weight --
'weight' is not an identifier in a private state object, it has to be
a
Brendan Eich wrote:
Herby Vojčík mailto:he...@mailbox.sk
January 20, 2012 10:39 AM
Brendan Eich wrote:
And again, we do not want a reified private state object, so private
could not be a free expression. This also hurts private(other).weight --
'weight' is not an identifier in a private state
On Jan 20, 2012, at 10:22 AM, Brendan Eich wrote:
Mark S. Miller mailto:erig...@google.com
January 20, 2012 10:15 AM
On Fri, Jan 20, 2012 at 9:57 AM, Herby Vojčík he...@mailbox.sk
mailto:he...@mailbox.sk wrote:
Single scope, args are lets view is making sense of this. Ok,
On Fri, Jan 20, 2012 at 10:46, Herby Vojčík he...@mailbox.sk wrote:
No, I asked for something else. How do it do: get a private property of
foo whose name is computed by expression? Something like
foo.@[expr]? Or is there no way to do it?
In other words, what is [] syntax for foo.@bar?
On Fri, Jan 20, 2012 at 10:59 AM, Erik Arvidsson
erik.arvids...@gmail.com wrote:
On Fri, Jan 20, 2012 at 10:46, Herby Vojčík he...@mailbox.sk wrote:
No, I asked for something else. How do it do: get a private property of
foo whose name is computed by expression? Something like
foo.@[expr]? Or
We should not have any doubts about this point. Quasis mean
almost-verbatim, including literal unescaped newlines and *all* spaces.
Mike, will you update the wiki?
Thanks for bringing this up, Luke.
/be
Mike Samuel mailto:mikesam...@gmail.com
January 20, 2012 9:47 AM
+1.
Some IDEs provide
2012/1/20 Brendan Eich bren...@mozilla.org:
We should not have any doubts about this point. Quasis mean almost-verbatim,
including literal unescaped newlines and *all* spaces.
Mike, will you update the wiki?
Will do.
___
es-discuss mailing list
On Jan 20, 2012, at 10:19 AM, Andreas Rossberg wrote:
On 20 January 2012 18:28, Allen Wirfs-Brock al...@wirfs-brock.com wrote:
On Jan 20, 2012, at 7:13 AM, Wes Garland wrote:
On 20 January 2012 09:22, Herby Vojčík he...@mailbox.sk wrote:
+1. I see no point why let e; should not
Erik Arvidsson wrote:
let object = ...
{
let key = Name.create()
let secret = {}
object.@key = secret
}
Oh, so all that foo.@bar does is to have different syntax for foo[bar],
bar being private name? Than it's not as cool as I thought at all.
private keyword in class proposal did
On Wed, Jan 18, 2012 at 17:27, Waldemar Horwat walde...@google.com wrote:
Octal constants:
Useful as arguments to chmod.
Proposal for 0o123 (as well as 0b01110).
MarkM: Concerned about 0O123.
Waldemar: Nothing unusul here. We've lived with 36l (meaning 36 long instead
of 361) in Java and C++
Isaac Schlueter mailto:i...@izs.me
January 20, 2012 1:00 PM
On behalf of Node.js, thank you. This is the right call.
On behalf of old Unix people, thank us -- and you! :-)
FWIW (ie, not much), I'm personally 100% ambivalent about 0O and 0B.
0O is less visually distinctive than 0o, and caps
Just to add weight to my previous mail, you may find it interesting to
notice that my proposed syntax match nearly exactly the proposed syntax of
the new Mozilla-editored Rust programming language:
http://doc.rust-lang.org/doc/tutorial.html#closure-compatibility
call_twice({|| I am a stack
On Fri, Jan 20, 2012 at 7:25 AM, Grant Husbands esdisc...@grant.x43.net wrote:
Jon Zeppieri wrote:
Is there a version of this desugaring that deals with recursive
bindings in the initializer expression of the loop?
How about something like this?
(given for (let varName = initExpr; testExpr;
On Fri, Jan 20, 2012 at 5:08 PM, Jon Zeppieri zeppi...@gmail.com wrote:
It's one thing if the difference
really isn't observable except in the case where a closure captures
the iteration variable (as Sam suggests), since it's hard to imagine
anyone wanting the current binding behavior in that
On 01/19/2012 10:51 PM, Jon Zeppieri wrote:
On Thu, Jan 19, 2012 at 11:02 PM, Brendan Eichbren...@mozilla.org wrote:
Yes kids, this means we are going with MarkM's lambda desugaring from:
https://mail.mozilla.org/pipermail/es-discuss/2008-October/007819.html
Is there a version of this
On Jan 20, 2012, at 5:55 AM, Andreas Rossberg wrote:
From the TC39 notes:
DaveH: What if there are duplicate top-level bindings?
MarkM: Top-level let should behave as much as possible the same as
concatenated scripts.
It's my claim that it is impossible to reconcile all of the following
Rust is a static language with many guarantees. It's not really
comparable to JS here.
JS extended with block-lambdas has no way to force downward-funarg-only
contract on functions called with block-lambda arguments. And indeed,
nothing goes wrong if those block-lambdas escape via the heap
(Aside: I wish I had used fn instead of function in 1995!)
How much does the fact that a symbol *could* be used (in theory) matter in
practice? Most regexes I see for valid identifiers are still of the
^[a-zA-Z_$][0-9a-zA-Z_$]*$ variety.
I’d expect λ to be in use in Greece, but how about ƒ
On Jan 20, 2012, at 5:08 PM, Brendan Eich wrote:
...
(Aside: I wish I had used fn instead of function in 1995!)
At the TC39 meeting we were trying to think of pragma candidates.
It wouldn't surprise me if JS programmer would happily trade one:
use fn;
per file in exchange for being able
Allen Wirfs-Brock
January 20, 2012
5:41 PM
At the TC39 meeting we
were trying to think of pragma candidates.It
wouldn't surprise me if JS programmer would happily trade one:use
fn;per file in exchange for being able to use
"fn" as a synonym for "function". In terms of
On 20/01/2012, at 19:17, Brendan Eich wrote:
Jorge mailto:jo...@jorgechamorro.com January 20, 2012 1:22 AM
Has a backtick/accent grave ever been considered and/or rejected ?
Anonymous function expression:
setTimeout( `(){ ... }, 1e3);
Named function expression:
setTimeout( `name(){
Jorge mailto:jo...@jorgechamorro.com
January 20, 2012 6:46 PM
1.- There are not quasi literals in the language yet
No, quasi-literals are approved for ES6. Already.
2.- quasi literals could as well use something else (the acute accent
?) instead
No, that is used for string literals,
On 21/01/2012, at 02:34, Axel Rauschmayer wrote:
how about ƒ (which has been mentioned many times)? It seems very appropriate
and is even easy to type on a Mac (easier than square brackets on a German
keyboard!).
setTimeout( ƒ () { ... }, 1e3)
setTimeout( `() { ... }, 1e3)
setTimeout( ƒ
On 21/01/2012, at 03:59, Brendan Eich wrote:
2.- quasi literals could as well use something else (the acute accent ?)
instead
No, that is used for string literals, since JS1 in 1995!
Sorry, I don't follow, with that you mean something else or the acute
accent ?
str = ´agudo´
Error
Jorge mailto:jo...@jorgechamorro.com
January 20, 2012 7:15 PM
Sorry, I don't follow, with that you mean something else or the
acute accent ?
Oh, not ' but the diacritical on é, you mean?
How do I type that on a US or UK keyboard? We are not going to use
non-ASCII characters, so you are
Axel Rauschmayer
January 20, 2012
5:34 PM
How
much does the fact that a symbol *could* be used (in theory) matter in
practice? Most regexes I see for valid identifiers are still of the
^[a-zA-Z_$][0-9a-zA-Z_$]*$ variety.I’d expect λ to be in use in
Greece, but how
Various thoughts:
How much does the fact that a symbol *could* be used (in theory) matter in
practice? Most regexes I see for valid identifiers are still of the
^[a-zA-Z_$][0-9a-zA-Z_$]*$ variety.
I’d expect λ to be in use in Greece, but how about ƒ (which has been
mentioned many
Axel Rauschmayer mailto:a...@rauschma.de
January 20, 2012 9:24 PM
- Hard to type: reading is far more important than typing, it is very
easy to adapt tools to help with typing.
ƒ is not particularly readable IMHO. It's florin, not mathematical
notation I've ever seen. Anyway we can't assume
61 matches
Mail list logo