On 15 June 2012 07:42, Herby Vojčík he...@mailbox.sk wrote:
T.J. Crowder wrote:
Making a point of making this a separate thread from the current ?? and
??= thread(s), which are thankfully looking close to consensus. So
that's infix and assignment.
Question: Should we consider unary as
On 15 June 2012 01:22, Allen Wirfs-Brock al...@wirfs-brock.com wrote:
A wonder if this wart is hairy enough, that we wouldn't be justified in some
explicit backwards compatibility hackery in the spec. to remove it.
For example, we could allow it to appear in parameter lists and provide a
T.J. Crowder wrote:
On 15 June 2012 07:42, Herby Vojčík he...@mailbox.sk
mailto:he...@mailbox.sk wrote:
T.J. Crowder wrote:
Making a point of making this a separate thread from the current
?? and
??= thread(s), which are thankfully looking close to consensus. So
On 15 June 2012 08:09, Andreas Rossberg rossb...@google.com wrote:
On 15 June 2012 01:22, Allen Wirfs-Brock al...@wirfs-brock.com wrote:
A wonder if this wart is hairy enough, that we wouldn't be justified in
some
explicit backwards compatibility hackery in the spec. to remove it.
For
Yes, what I mean is that I did not see since a long time something like
a===null?b:c or if (a===null)||b, and except for specific use like
Object.create(null) I don't see a lot of null being used, then making
the distinction for ??, ?: and others looks too subtle
Le 15/06/2012 04:20, Brendan
This isn't unrelated. If we do get patterns into Harmony they may
subsume some of the postfix-?? (which does not work syntactically, IMHO)
or prefix-? ideas. Or at least prefix-? may show up in the pattern
language (dherman and I have discussed it).
Syntax design requries global oversight,
On 15 June 2012 12:41, Brendan Eich bren...@mozilla.com wrote:
This isn't unrelated. If we do get patterns into Harmony they may subsume
some of the postfix-?? (which does not work syntactically, IMHO) or
prefix-? ideas. Or at least prefix-? may show up in the pattern language
(dherman and I
I think the original thrust of this thread may have got lost a bit in the
(useful) discussion of null and undefined, so coming back to the original
point:
On 12 June 2012 16:29, T.J. Crowder t...@crowdersoftware.com wrote:
In the current default operator strawman[1], the operator is ??, e.g.:
Probably there are very good reasons but I reask the question : why
should the attempt to access a property of a variable equal to undefined
global property not return undefined global property ? (ie a way that
this works : if (a.b.c.d) {} when a,a.b, etc are not set)
This can be usefull when
On 15 June 2012 14:34, Aymeric Vitte vitteayme...@gmail.com wrote:
Example :
console.log(a);//Reference error, GetBase returns undefined
console.log(window.a);//undefined
-- does not seem very logical, no ?
To me this would be a big step backward, after the very large stride
forward this
I am not talking about defining implicit properties or such things,
neither having undeclared stuff looking declared, but just changing the
behavior of retrieving a property when base is undefined, which will
then be undefined.
If am I reading correctly the specs, doing this change will work
On 15 June 2012 15:34, Aymeric Vitte vitteayme...@gmail.com wrote:
I am not talking about defining implicit properties or such things,
neither having undeclared stuff looking declared, but just changing the
behavior of retrieving a property when base is undefined, which will then
be
On 23 March 2012 12:12, Steven Levithan wrote:
Erik Corry wrote:
In perl the recommended version is
text.replace(/([^a-zA-Z0-9])/g, \\$1)
which is future-proof and safe and I think this also works for JS.
It's probably future-proof and safe, but it escapes 65,520 characters more
than
Hey Mark,
ParallelArray and index are left out because of our desire to provide a few
good methods that help/force programmers to think about parallel algorithms and
not just speeding up sequential algorithms. Array map is really just syntactic
sugar for for loops and invites thinking that
YES. PLEASE put this in!
http://stackoverflow.com/a/6969486/151312
function escapeRegExp(str) {
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, \\$);
}
I'm doing my best to reply to every single question that pops up on
stackoverflow and point them to this answer... but there are
On 15 June 2012 17:00, Aymeric Vitte vitteayme...@gmail.com wrote:
Right now I am not proposing but trying to understand why it is like this
Sorry, I thought you were proposing something. Your first message talked
about changing how GetValue works, apologies if I misunderstood.
Brendan could
On Fri, Jun 15, 2012 at 6:28 AM, T.J. Crowder t...@crowdersoftware.com wrote:
Does anyone have an opinion on a second ternary a'la the above (syntax
notwithstanding). So far we have only my opinion (I like it and would have
uses for it; I don't _need_ it), Brendan's (too thin)[1], and Herby's
On 15 June 2012 18:05, Erik Arvidsson erik.arvids...@gmail.com wrote:
Since you are asking for opinions.
I don't want it. It doesn't carry its own weight.
I was, and that includes opinions against. Thanks!
-- T.J.
___
es-discuss mailing list
On Mar 23, 2012, at 8:16 AM, Steven Levithan wrote:
Although this is only a minor convenience since you can do something like
text.replace(/[-[\]{}()*+?.,\\^$|]/g, \\$), the list of special characters
is subject to change.
That sounds like another good argument for standardizing.
The only
Currently there's no way to have a data property that is writable by some
but not all. This can't even really be achieved with accessors or proxies
directly. Rather, the underlying data is mutated through some other avenue,
and the value returned on access comes from this secondary source. Neither
On Jun 14, 2012, at 1:45 PM, Brendan Eich wrote:
I can see adding ?? and ??= (undefined-only, not undefined-or-null).
I think ?? is the highest priority.
Is ||= really worth it? It would not assign if the left side is truthy, but
perhaps no one will mind.
Given ||= is there any oxygen
David Herman wrote:
So I favor ?? as well as both ||= and ??=.
As for null, I can see how there's confusion about whether to use null vs undefined, and
so I can see why CoffeeScript would just try to blur the distinction between them. But I
think by sticking to the simpler semantics it will
The description of Object.protectProperty:
Object.protectProperty(object : Object, key : String) - Name
Object.protectProperty(object : Object, key : String, protector : Name) -
true
Object.protectProperty(object : Object, currentProtector : Name) - true
Object.protectProperty(object : Object,
Hi.
I have hard time to put my objections well. Different words appear in my
mind like too monolithic, too spaghetti, ... but none of them is
very good at explaining the problem.
It seems to me that this make thing complex and brittle. Protected
overides writable and configurable, so their
Addition to previous post on aliasProperty: you can only create alias on
configurable property, of course.
Herby
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
I addressed some of these as well but didn't put it up here yet. Semantics
(this is all on the gist as well in more readable form)
* Objects keep an internal map of protector *Name* objects to keys.
* A protector can only protect one key per object.
* Each key on an object can only have one
Erik Arvidsson wrote:
On Fri, Jun 15, 2012 at 6:28 AM, T.J. Crowdert...@crowdersoftware.com wrote:
Does anyone have an opinion on a second ternary a'la the above (syntax
notwithstanding). So far we have only my opinion (I like it and would have
uses for it; I don't _need_ it), Brendan's (too
Note: Given the above constraints on configurability, no norms are violated
in this. A non-writable property is writable currently using
Object.defineProperty. It's just not writable directly, which is upheld
here.
___
es-discuss mailing list
Le 15/06/2012 21:27, Brandon Benvie a écrit :
Currently there's no way to have a data property that is writable by
some but not all.
My heartbeat reaction to this first sentence is: is it a use case anyway?
This can't even really be achieved with accessors or proxies directly.
Rather, the
Actually I'm working on implementing it now. I previously partially
implemented Names which is half the equation (though only in V8) and this
is just an extension to that.
There shouldn't need to be any additional checks using what I've proposed.
A non-writable property is no more writable than
On Jun 15, 2012, at 12:33 PM, David Herman wrote:
So I favor ?? as well as both ||= and ??=.
Adding ||= and ??= without = will cause my symmetry-reflex to twitch, despite
not seeing a purpose for it I may find it hard to resist supporting that too.
;-)
G.
satyr wrote:
On Sat, Jun 16, 2012 at 4:33 AM, David Herman dher...@mozilla.com
mailto:dher...@mozilla.com wrote:
As for null, I can see how there's confusion about whether to use
null vs undefined, and so I can see why CoffeeScript would just
try to blur the distinction between
On Fri, Jun 15, 2012 at 11:35 PM, Hudson, Rick rick.hud...@intel.com wrote:
Hey Mark,
ParallelArray and index are left out because of our desire to provide a few
good methods that help/force programmers to think about parallel algorithms
and not just speeding up sequential algorithms. Array
On Fri, Jun 15, 2012 at 6:00 PM, Brendan Eich bren...@mozilla.com wrote:
Can you give a real-world example where null rather than undefined is
soaked up? I'm guessing DOM but guessing is bad (cf. Sherlock Holmes).
Wouldn't any case where you return null to mean explicitly no object be
such a
Maybe, probably, of course ;-).
I'm still looking for real-world use-cases, code that actually exists
(in CoffeeScript or JS) that needs to soak up null-or-undefined, not
just undefined.
/be
John Tamplin wrote:
On Fri, Jun 15, 2012 at 6:00 PM, Brendan Eich bren...@mozilla.com
On 15 June 2012 22:22, Brendan Eich bren...@mozilla.org wrote:
If everyone's opinion carries weight, then we are tied :-P. Kidding.
But aside from opinions and their weight, we have a problem if wouldn't
hurt is the answer for syntax proposals.
Who said it was?
New syntax does hurt. It
T.J. Crowder wrote:
On 15 June 2012 22:22, Brendan Eich bren...@mozilla.org
mailto:bren...@mozilla.org wrote:
If everyone's opinion carries weight, then we are tied :-P. Kidding.
But aside from opinions and their weight, we have a problem if
wouldn't hurt is the answer for syntax
Brendan Eich wrote:
* It brings new semantics not expressible in the language (let, const,
modules, generators).
* It is an affordance without new semantics for a common pattern
that's verbose and error-prone when open-coded.
Classes (maximally minimal, mainly for extends and super) is a
The gist now includes a rough implementation of this (
https://gist.github.com/2938186 ).
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Download it from:
http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts
Changes from May TC39 Review
Tentative addition of Class Definitions Syntax and Semantics in 13.5 based upon
Maximally Minimal Strawman. NOTE-Classes do not yet have full consensus within
TC39 and may not
40 matches
Mail list logo