August 6, 2012
Minutes (Notes) of the meeting of jQuery
Location: #jquery-meeting on Freenode
Attending: DaveMethvin, gibson042, gnarf
Time: Noon ET
Official Agenda:
jQuery 1.8
Ship tomorrow? Yes!
Low-risk patches to land?
August 6, 2012
Minutes (Notes) of the meeting of jQuery
Location: #jquery-meeting on Freenode
Attending: DaveMethvin, gibson042, gnarf
Time: Noon ET
Official Agenda:
jQuery 1.8
Ship tomorrow? Yes!
Low-risk patches to land?
**August 2, 2012
**
Location: #jquery-meeting on Freenode
Attending: Corey, Scott, Dave, John, Jörn
Time: Noon ET
QUnit
Need to review pull requests and other issues
TestSwarm
BrowserStack running better now, all UI jobs green without us changing anything
Corey working on post-commit hooks, will use those for testswarm and testswarm-browserstack to deploy updates in the future
John Bender working on getting Mobile fixed in IE9, a few (swarm) heisenbugs make that not as much fun
Need to move testswarm-browserstack to jquery account, use Krinkle’s fork as starting point. Ask Clark though to move his repo to keep forks and issues.
Move to new service box
July 30, 2012
Minutes (Notes) of the meeting of jQuery
Location: #jquery-meeting on Freenode
Attending: DaveMethvin, timmywil, mikesherov, jaubourg,
scott_gonzalez, rwaldron, gnarf
Time: Noon ET
Official Agenda:
Unit tests PASSING!
jQuery 1.8
Patches landed — do we need an RC2?
Final release date?
http://bugs.jquery.com/ticket/12158 (throws)
Leave it quoted for 1.8, warn that it’s coming out after that
“it was put in to prevent YUI compressor from breaking”
https://github.com/jquery/sizzle/pull/139(fixes to pseudo argument cases)
Scott has UI 1.8.22 out, compatible with core 1.8
Mobile bitten by removal of $.attrFn! (undocumented interface)
Avoid private arguments to our public APIs
Present: Mark Miller (MM), Brendan Eich (BE), Yehuda Katz (YK), Luke Hoban (LH), Rick Waldron (RW), Alex Russell (AR), Tom Van-Cutsem (TVC), Bill Ticehurst (BT), Sam Tobin-Hochstadt (STH), Allen Wirfs-Brock (AWB), Doug Crockford (DC), John Neumann (JN), Erik Arvidsson (EA), Dave Herman (DH), Norbert Lindenberg (NL), Oliver Hunt (OH)
YK: namespacing pattern: class that goes inside existing object; like Ember.View
DH: Ember.View = class ...
AWB: or Ember = { View: class ... }
AWB: early error list
yield
MM: yield
should not be an error!
DH: definitely not! burden of proof is on the rejector; there's no reason to reject here
YK: why can't we do a getter?
DH: there's no way to declaratively figure out what the actual function for the class is, because the getter returns the function
AWB: class declarations create const bindings
AR: can you justify?
AWB: why would you want to overwrite it?
RW: what about builtins needing to be patched?
DH: those are independently specified to be writable; the relevant question is whether user programs will want to patch up local class bindings
AWB: whether this is a good idea probably depends on whether you're a library writer or application writer; if you aren't exporting class definitions
AR: you could still say const x = class
YK: that distinction isn't useful; every app has stuff like libraries
AR: restriction needs justification
DC: my preference is only for the expression form so there's no confusion
RW: surveyed ~200 developers, majority did not want const bindings by default
MM: I like crock's suggestion, just don't do the declarative one
EA: what?
LH: that's just putting cost on everyone else rather than us
MM: no, I'm talking about saving the cognitive cost to user
YK: if we went with const by default, I'd agree we shouldn't do declarative
AR: goal is most value for shortest syntax, without footguns; the analogy with const seems tenuous
AWB: this is subtle, and most people won't even notice
DH: I don't buy that there are significant errors being caught, there's no benefit to engines, there's not enough benefit to users, and it's clear there are costs. so I don't see any reason to do const binding by default
general agreement
MM: I'm opposed to declarative form. but if it is going to be declarative, should pick a declarative form and say it's the same as that, and let is the only clear candidate
DH: I'm not convinced function is impossible
MM: the expression extends is the killer. makes it impossible
LH: I'm convinced it can't hoist
DH: why not a more restricted syntax for declarative form in order to get hoisting?
1
2
3
4
|
|
LH: surprising that you can't compute the parent
DH: there are surprises in each alternative we've talked about here; but I claim it's surprising to lose hoisting
OH: relevant analogy here is the fact that other languages with declarative classes don't care about order
LH: CoffeeScript does; it translates to var x = ...
AR: pulse?
DH: I think we all acknowledge this is tricky; I feel strongest that leaving out the declarative is failing in our duty
MM: if we leave out the declarative, then people will simply learn that the language is let c = class
BE: why are we debating this?
STH: Mark and Doug are arguing it
BE: over-minimizing and failing at usability
YK: let x = class extends Bar { }
is just crazy
DH: that's laughable as the common case
AWB: this came from the hoisting debate
BE: I thought we agreed to dead zone. if we get stuck on this we'll never finish classes
LH: agreed; we need a separate proposal for hoisting
DH: happy to revisit later if I can come up with better alternatives
MM: we have adequate consensus that declarative desugars to let
AWB: classes are strict?
STH: I thought class did not imply strict mode
AR: does anyone want that?
no
AWB: default constructor has empty body? we'll get back to this
AWB: local class name scoping? similar to named function expression, but const bound?
DH: const bound?
AWB: just like NFE
DH: I actually didn't know NFE's had a const binding!
AWB: is this a bug? should we reconsider?
MM: avoids refactoring hazard
MM: my first choice would be to fix function: within function body its name is const; second choice is for class to be consistent
BE: not sure why we're talking about this, can't be changed
MM: in that case the class expression form should follow NFE
general agreement
DC: I disagree with the scoping decision about class declarations
DH: confused what we're talking about
STH: in body of class declaration, should there be a fresh scope contour
OH: it's not uncommon to overwrite the class
MM: example:
1
2
3
4
5
|
|
this is very confusing for this to fail
DH: why would you ever want the extra scope contour?
STH: Rick gave a good example:
1
2
3
4
5
6
|
|
DH: not compelling; you mutated C! if you need the earlier value, you should save it; the confusion would only arise if you expected C to be a static class like in Java, but that's not how JavaScript bindings work
RW: the common pattern being the defensive-constructor pattern:
1
2
3
4
5
6
|
|
DH: now I'm that much more confident that there should not be another scope contour; I don't see any compelling argument
AWB: let me throw up another justification: class declarations often appear at global scope, not uncommon for somebody to write class body where there are references to the class; at global scope, anybody could have assigned to that value
DH: I don't want to poison non-global cases just to protect against one hazard of global code, when global code is hazardous anyway
AWB: I would put protecting global code at a higher priority than a subtlety of inner bindings, but I'll go with the flow if I can't convince you
DC: I don't want to hold this up
MM: are you willing to go with the function parallel?
DC: yes; I don't prefer it but I won't hold this up
AWB: missing extends, what's the default? intrinsics
agreement
AWB: extends null: prototype is null, Foo.[[Prototype]] extends intrinsic Function.prototype
agreement
AWB: extends a constructor:
1
2
3
|
|
IOW, class-side inheritance
MM: I disagree, the history of JS does not have it
BE: I disagree with that claim, history shows some examples on both sides
EA: people do refer to this
in static functions; they have the freedom to
use the class name or this
, and they do both
LH: CoffeeScript does class-side inheritance, but they don't do it like this -- they copy
BE: but they will avoid the copy once you implement dunder-proto
MM: you can't depend on it
BE: this gives programmers more flexibility to do it however they want
MM: but then people can't use a this-sensitive function!
BE: not true, the contract of a JS function includes its this-sensitivity
Arv, AR: nod visibly
LH: at end of day, plenty of static functions in JS that are this-sensitive
YK: that's the style of program that I write
EA: some style guides say don't do it
LH: backbone does this
MM: so Foo will inherit Object.create
, Object.getOwnPropertyDescriptor
, etc?
DH: that does mean we'll be more and more hampered from adding methods to Object
EA: but now we have modules
BE: true, that's the right answer
MM: polluting of statics with everything in Object is fatal; those are just not relevant to most of the class abstractions people write; when I write
1
|
|
I don't want Point.getOwnPropertyDescriptor
AWB: you only opt into that with class Point extends Object
; with class Point { }
you don't get any of that stuff
DH: feels giddy and sees the clouds part and sun shining through, with angels singing from on high
YK: also, there are override hazards of pollution: if someone freezes Object, then you wouldn't be able to override sweet class method names like keys(), so the ability to avoid that pollution is important
MM: valid point. thing is, we don't have static form b/c you can supposedly use imperative assignment, but that won't work for frozen classes
BE: that's just an argument for statics in the future
AWB: minimality ftw
AWB: class Foo extends Object.prototype
?
LH: this surprised me when I saw it in the spec
AWB: older version of class proposal had a "prototype" contextual keyword for this case
DH: what happens if you're defining a meta-class? you can't tell whether it's a prototype or a constructor
BE: that's a smell
AWB: constructor trumps object
BE: YAGNI, cut it
AWB: so what do we do if it's not a constructor?
DH: throw
BE: that's more future-proof
general agreement
AWB: extends neither an object nor null: type error
DH: actual type errors in JS, yay!
RW: curious: what if Foo extends { ... }
DH: non-constructable, so error; but could use a function literal
AWB: extends value is constructor but its prototype value is neither an object nor null: type error (existing semantics of new: silently uses Object.prototype)
agreement
AWB: Foo.prototype
is an immutable binding? builtin constructors are
immutable, user function(){} mutable
some surprise
MM: make .constructor
mutable but .prototype
immutable
YK: why? (I want mutable)
MM: nice for classes for instanceof to be a reliable test
YK: why?
AWB: classes are higher integrity; association between constructor and prototype actually means something now
BE: I'm moved by higher-integrity, self-hosting with minimal work
STH: not compelling to make self-hosting easy, just possible; defineProperty is just fine for that
DH: most everyone seems to agree that .prototype is immutable, .constructor is mutable. Arv and AR, thoughts?
EA: that's fine
AR: yup, that's fine
AWB: method attributes: sealed? ({ writeable: true, configurable: false, enumerable: false}
)
YK: you don't want to switch from a data property to an accessor?
AWB: non-configurable but writable is reasonable
MM: this depends crucially on our stance on override mistake; this prevents me from making an accessor
AR: I don't see why we're considering making this anything other than writeable: true, configurable: true
BE: Allen feels having the shape be fixed is useful
discussion
BE: so consensus is writable: true, configurable: true
agreement
AWB: methods are not constructable?
DH: what?
MM: biggest benefit: this further aligns classes with builtins
MM: three reasons for this:
LH: compelling for me: never seen a class-like abstraction on a prototype of a class-like abstraction
MM: I have, but you still can; just do it in a way that's obvious, don't do it with method syntax
BE: hard cases make bad law! (agreeing with MM -- use a longhand)
YK: so you can say classes really only existed as builtins, now they're expressible
AWB: get/set accessors are constructors? that's just the way they are in ES5
BE: is there precedent in builtins?
AWB: nothing explicit
YK: I'd prefer consistency between these last two cases
AWB: accessor properties on prototype are enumerable
BE: what about DOM/WebIDL? accessors on prototype?
LH: they're enumerable, yes
AWB: suggestion: concise methods should be the same for both classes and object literals
AWB: breaking change from ES5: get/set functions non-constructable
AWB: class accessor properties:
AR: no
EA: no
YK: when you use an accessor you're trying to act like a data property
BE: so compelling argument is: accessors are enumerable, configurable, and writable
AWB: Luke suggests that default constructor should do a super-constructor
call with same arguments constructor(...args) {super(...args)}
BE: default constructor in CoffeeScript, Ruby
AWB: perhaps needs to test for Object constructor and not call it
DH: no observable difference!
MM: if there's no observable difference, go with simplest spec
AWB: other places where we do implicit super call? I say no
DH: I say no.
LH: I agree, I think there's no clear way for us to do it, but I also think there will be many, many bugs
BE: irreducible complexity here, caveat refactorer
TVC: (introduction)
__proto__
writable destroys invariant that [[Prototype]] link is stable
Frozen objects should continue to have stable prototype chain
getPrototypeOf trap result should be consistent wth target object's proto
MM: if the proto can be changed, the proxy should...?
TVC: spec interceptable [[Prototype]]
[[Prototype]] is currently an internal prop
Would need to become internal accessor prop or split into [[GetProto]] / [[SetProto]]
[[GetProto]] / [[SetProto]] would trigger traps for proxies
AWB/BE: This is good
YK: Do we want an analogous setPrototypeOf trap?
TVC: Yes
AWB: If you have capability to set prototype ?
TVC: proxy.__proto__
should just trigger the proxy's get trap
1
2
3
4
|
|
...
Trapping instanceof
Function [[HasInstance]]
x instanceof Global answering true if x and Global live in separate frames/windows
1
2
3
|
|
MM: Explains concerns originally raised on es-discuss list by David Bruant, but shows the cap-leak is tolerable ...
DH: if hasInstance private name on instanceof RHS...
MM: What Object.prototype
does private name inherit from?
AWB: Probably null
BE: the E4X any (*) name had null proto in SpiderMonkey, was true singleton in VM
AWB: functions have home context, but no reason for objects to
DH: this is a new idea of value that is not really any object
OH: if it has no properties and no prototype
BE: cannot be forged.
Discussion about unforgeability.
DH: Trapping instanceof use case
Trapping Object.isExtensible
Currently Object.isExtensible doesnt trap same for isSealed isFrozen
1
2
3
|
|
Direct Proxies: "internal" properties
Issue raised by Jason Orendorff; auto unwrapping is dangerous if built-in methods return non-primitive values
Case:
1
2
3
4
5
6
|
|
Solution (?)
Instead of auto-unwrapping, delegate to a nativeCall trap (which auto-unwraps by default)
[[PrimitiveValue]]
BE: nativeCall trap is back door between built-in this-type-specific method impls and proxies. Not good for standardization. Better to make such built-ins generic via Name object internal property identifiers, a la AWB's subclassing built-ins strawman
Discussion moved to Subclassing...
MM: re: what you want syntax wise
AWB: one way to address, not use instance that is automattically created, create new array and patch the proto
... BE: (back to nativeCall trap)
AWB: Let's continue the issue of subclassability on es-discuss
TVC: defaultValue slide
See slide?
BE/AWB: defer this to reflect spec handling, non-observable way.
TVC: getName(target, name.public) instead of get(target, name.public) -- this way get trap that doesn't expect name objects won't break on unexpected inputs
DH: has, delete, ...? bigger surface area
TVC: you'd still have to branch in the code, so this is cleaner for user
YK: debugging tool will want to be able to see these things
OH: a built-in debugger will have hooks into the VM
YK: many debuggers use reflection
BE: so it's just a matter of having a bunch of XXXName traps. in for a penny, in for a pound
STH: this is simple and straightforward, we know how to do it
BE: when in doubt use brute force (K. Thompson)
STH: when brute force doesn't work, you're not using enough of it
TVC: if getName returns undefined, forwards to target; so default behavior is transparent proxying
TVC: otherwise, getName takes public name and returns [privateName, value] to show that you know the private name and produce the value
STH: what about set?
TVC: returns name and success value
DH: what about unique names?
TVC: same mechanism
DH: so name.public === name?
MM: I like that
MM: are unique names in?
DH: I think so
BE: are they actually distinguishable?
MM: have to be if name.public === name or name.public !== name distinction
DH: (named) boolean flag to Name constructor
DH: do we have some way of reflecting unique names?
TVC: Object.getNames() ?
DH: ugh...
AWB: maybe a flag to Object.getOwnPropertyNames({ unique: true })
BE (editing notes): flags to methods are an API design anti-pattern
TVC: VirtualHandler fundamental traps throw, should they forward instead?
agreement
TVC: and rename to Handler?
agreement
MM: next issue: freeze, seal, defineOwnProperties each modify configuration of bunches of separate properties, and can fail partway through; we tried & failed in ES5 to make it atomic
MM: current unspecified order means could break
MM: tom did something in his code that's beautiful: order-independent. just keep going, remember you failed, do as many as you can, and then throw at the end
STH: if target is proxy, weird unpredictably stuff can happen
DH: no worse than anything that does for-in loops, right?
TVC: well, it's getOwnPropertyNames
MM: that's specified to for-in order, right?
DH: but what does for-in order say about non-enumerable properties? evil grin
MM: cracks up
AWB: sounds like an ES5 bug!
VirtualHandler Rename VirtualHandler to just Handler?
Tom Van-Cutsem's Proxy presentation slides:
http://soft.vub.ac.be/~tvcutsem/invokedynamic/presentations/TC39-Proxies-July2012.pdf
(http://wiki.ecmascript.org/doku.php?id=harmony:quasis)
AWB: first order of business, to ban the term "quasis"
applause
AWB: proposing "string templates" (note: settled on Template Strings ^RW)
DH: a lot of people say "string interpolation" in other languages
AWB: must use ${identifier}, don't allow $identifier
EA: uncomfortable with that
BE: troublesome to identify right end of identifier
EA: withdraw my objection
AWB: untagged quasi is PrimaryExpression, tagged quasi is CallExpression
AWB: at runtime, tag must evaluate to a function
DH: well, you just do a call and that does the check
AWB: lexing treated similarly to regexp; add a new context called "lexical goal" so lexer can tell what a curly means (like a flex(1) mode)
AWB: default escaping should be equivalent to normal strings
BE: we should canonicalize line separators to \n
AWB: for both cooked and raw?
BE: raw should be raw!
AWB: raw tag is a property of the String constructor:
1
|
|
DH: that's pretty badass
BE: too long a name; wanna import a small name from a module
AWB: well, importing takes more characters than renaming with a var declaration
BE: let's put off the bikeshed in the interest of time
AWB: simplify call site object (first arg to prefix-tag function): it's just an array of the cooked elements since that's the common case, with a .raw expando holding array of the raw elements, both arrays frozen
BE: is there a grawlix problem with ` syntax?
DH: I've tried polling and opinions are utterly mutually incompatible
BE: what about mandated prefix but with existing e.g. ' or " quotes
LH: that's just wrong, the most common case will be unprefixed
MM: proposal for object literals inside ${...} context, based on object literal shorthand {foo} meaning not {foo:foo} but rather {get foo() foo, set foo(bar) {foo=bar}} to sync variable foo with property (!)
STH: that is going to be utterly unexpected
MM: ok, not gonna argue for it
AWB: what's left on the agenda?
RW: Erik is gonna take another whack at the error stack proposal
BE: forEach on maps and sets -- how about common signature, set passes e as index:
1
2
3
|
|
FILED: https://bugs.ecmascript.org/show_bug.cgi?id=591 FILED: https://bugs.ecmascript.org/show_bug.cgi?id=592
DH: I'd love help with a documentation hack day for the wiki
LH: another agenda item we skipped: for (let ; ; ) binding semantics
DH: I thought we came to agreement on that at the Yahoo! meeting?
AWB: we had a long discussion and consensus was to make for (let ; ;) bind on each iteration
AWB: subsequent to that, considerable discussion on es-discuss about that, issues associated with closure capture occurring in the initialization expressions; couple different semantics to work around that, with more complex copying at each iteration; another approach is a new kind of Reference value, got really complex
AWB: working on the specs, I took easy way out for now; defined it a la C# (per-loop lexical binding); just for now b/c it's simple, understandable, and there's still controversy
AWB: another option is not to have a let for of C-style loops
STH, DH, OH: no!!!
DH: this needs another trip around the block but no time today
MM: my opinion is it doesn't matter what happens with closure capture in the head, b/c it's an esoteric case that will be extremely rare
BE: I think the January semantics is still probably the right answer:
1
2
3
4
5
6
|
|
OH: it logically makes sense
Present: Mark Miller (MM), Brendan Eich (BE), Yehuda Katz (YK), Luke Hoban (LH), Andreas Rossberg (ARB), Rick Waldron (RW), Alex Russell (AR), Tom Van-Cutsem (TVC), Bill Ticehurst (BT), Rafeal Weinstein (RWS), Sam Tobin-Hochstadt (STH), Allen Wirfs-Brock (AWB), Doug Crockford (DC), John Neumann (JN), Erik Arvidsson (EA), Dave Herman (DH), Norbert Lindenberg (NL), Oliver Hunt (OH)
AWB:
Global scoping var vs. let and const declarations var and function need to go on global object
What do we do with new binding forms? (class, module, imports, let, const) Q. Should these become properties of the global object?
DH: Not sure a restriction is needed, the global scope is the global object in JavaScript. With modules, globals are less of a problem.
YK: (clarification)
AWB, DH, BE: (providing background, e.g. on temporal dead zone for let/const/classs
BE: Agree there needs to be some form of additional info not in property descriptor
ARB: Need additional static scope information e.g. for modules. Need additional dynamic information for temporal deadzone.
DH: If you drop the idea that let is always let everywhere. Questions whether let should be more like var at global scope.
ARB: Does not work for modules.
AR: Reasonable to say that the global scope is never finished and that properties can continue to be defined
AWB: An example.
A const declaration; it creates a property on the global object; it's not defined yet; Before it's initialized another piece of code sets the value - what happens?
DH: (board notes)
AWB: "Expando" was previously agreed upon, where the additional layer of lexical scope is available but shared. (Notes that Andreas did not buy into this)
DH: Agrees. Explains where "Expando" fixes the problems of "Traditional".
1
2
3
4
5
6
|
|
This would identify that "x" was declared with "let" and so forth.
STH:
A.
1
2
3
4
5
6
|
|
"Expando" (#4) Makes this an error
1
2
3
4
|
|
Present: Yehuda Katz (YK), Luke Hoban (LH), Rick Waldron (RW), Alex Russell (AR), Tom Van Cutsem (TVC), Bill Ticehurst (BT), Brendan Eich (BE), Sam Tobin-Hochstadt (STH), Norbert Lindenberg (NL), Allen Wirfs-Brock (AWB), Doug Crockford (DC), John Neumann (JN), Oliver Hunt (OH), Erik Arvidsson (EA), Dave Herman (DH)
10:00-11:00am
Discussion of proposed agenda.
Determine participants required for specific subjects.
July agenda adopted
May minutes approved
Draft related bug filing Increased community participation, a good thing Issue with numbers not matching duplicate filings, be aware
Quasi Literal added to specification Spec issues have arisen, will review
Initial work defining tail call semantics (still need to define tail positions in 13.7) What defines a "tail call" in ES Existing Call forms need to be specified in how they relate to tail positions. (call, apply, etc)
STH: Important that call and apply be treated as tail calls
YK: and accessors
STH: Agree.
...discussion of examples
AWB: Differences between accessor calls as they apply to proxy call traps, not definitively identifiable at syntax level. The function call operator and the call trap.
TVC: Proxy trap calls currently can never be in a tail position (except "apply" and "construct" traps)
STH: call should be in tail position. Clarification of known call site syntax, per spec.
Anything that could invoke user written code in a tail position to act as a tail call.
call, apply, accessors, quasi (interpolation), proxy calls
We still need to specify the tail positions in the syntax. There's a start by DH on http://wiki.ecmascript.org/doku.php?id=harmony:proper_tail_calls which uses an attribute grammar, but the current spec draft leaves this blank.
Filed: https://bugs.ecmascript.org/show_bug.cgi?id=590
(http://wiki.ecmascript.org/doku.php?id=strawman:match_web_reality_spec)
Introduction to discussion by Luke Hoban
LH: Attempted to write a guide to make regex specification match current implementation wherein order of production matters. See 15.10.1 Patterns in above link.
...Gives specfic examples from 15.10.1
Discussion between AWB and LH re: semantic annotations and redefinition.
YK: Do non-web implementations match current spec or web reality?
AR: Are there any non-web implementations?
YK: Rhino?
BE: matches reality because based on SpiderMonkey circa 1998
Test cases? Yes.
BT: Yes, cases exist in Chakra
LH: (Refers to examples)
NL: Do these affect unicode? We had agreement at previous meeting that web reality changes would not be applied in Unicode mode (/re/u).
LH: This is what regex is in reality... Waldemar did not want to specify because it's too hard to specify, but now the work is done
AWB: Too hard is not an excuse to not specify, good that the work is now done.
Discussion of "\u" in existing regex - \ug or \u{12} is interpreted, but differently than planned for Unicode mode
Trailing /u flag?
Makes grammar more complicated to have \u{...} only if /u flag used.
AWB: Three things to address: Web reality, Unicode support, new extensions
LH: /u the only way to opt-in to Unicode escapes with curlies, with Unicode extensions.
NL: need to reserve backslash with character for new escapes in the future, e.g. \p for Unicode character properties
OH: Fairly substantial regex in wild all created with RegExp constructor.
YK: Moving forward: Evangelize using Unicode and tacking "/u" onto all new regex?
BE, OH, AR: yes.
Decision: LH and NL to collaborate on integrated proposal
http://wiki.ecmascript.org/doku.php?id=harmony:simple_maps_and_sets
Deferred, got to it on third day
BE: Recap, last meeting there was discussion about getting a strawman from YK
YK: I began specifying, but existing questions prevented
BE: some want to solve not only the typeof null problem, but also "array"
YK: What is the usecase for Object.isObject
DC: Polymorphic interface
AWB: "has properties"
RW: Similar to isNaN: isNull that is only for null
OH:(Reiterates that we cannot change typeof)
AWB: what is it about host (exotic) objects that need to be differentiated from native (ordinary) objects?
YK: Reclarification about things that are not objects (in the [object Object] sense) that say they are.
AWB: If we go down this path, can anyone redefine the return value
YK: My question is: either always return object Object, or let anyone change to return anything
AWB: Rephrase as "extending toString()". Removing [[Class]] from spec, but now as [[NativeBrand]]. The default: exactly as they are today. in ES6, if this property is defined, then use it, if not, use default.
Mixed discussion of real world uses of: Object.prototype.toString.call(o)
BE: 1JS Killed typeof null
BE, OH: Like the idea of a configurable property to define explicit value of brand
YK: why is what "toString" returns so important?
AR: 2 things:
There is worry that changes to spec that affect the return of toString will have adverse impact on existing libraries and users when they encounter new runtime behaviours where the existing behaviour is expected.
Belief that we need a more flexible mechanism, whether it is AWB's configurable property that defaults when not explicitly set, or AR et al trait type test proposal.
BE, AWB: nominal type tests considered an anti-pattern per Smalltalk, but they happen in JS not only "because they can" -- sometimes because of built-ins you need to know
Norbert Lindenberg: (Introduction and opening discussion)
Discussion, re: contributors
Function length values? Using ES5 section 15 rules would cause respecified functions like String.prototype.localeCompare to have larger length values; using ES6 rules would let them keep old values.
Leads into larger discussion about Function length property.
Decision: Apply ES6 rules to all functions in Internationalization API.
Numbering system, number formatting system. Would like to reference Unicode Technical Standard 35.
Outstanding issue:
If you have 4 different impls, 3 of them support a language that you want to support, how can you polyfill the 4th to support the language.
The constructor can re-declared?
There is no easy way currently, second version of Intl spec will address this.
Conformance tests being written for test262.
NL will have the final draft prepared for September meeting, but will produce drafts leading up to that meeting.
AWB:
within curlies: any unicode code point value \u{nnn} so essentially three ways within string literal:
BT: treating curlies as utf32 value? AWB: curlies contain code point value, which you could call utf32
DH: old-style escapes always are a single utf16 code unit, so always .length 1; new-style escapes always are a single Unicode code point, so may have .length 2
NL: "<
AWB: one point of controversy: what happens with utf16 escape sequences within identifiers
var <<wacky identifier>> = 12
-- is that a valid identifier?var \u{<<wacky identifier code point>>} = 12
-- is that a valid
identifier?NL: and, for example, what if it goes in an eval?
DH: careful! difference between:
1
2
3
|
|
AWB: disallowed:
var \uD83D\uDE01 = 6
eval("var \\uD83D\\uDE01 = 6")
allowed:
var \u{1F601} = 6
eval("var \\u{1F601} = 6")
DH: any reason to allow those?
YK: sometimes tools taking Unicode identifiers from other languages and translating to JS
DC: we have an opportunity to do this right; \u{...}
is the right way to
think of things
DH: we have eval in the language, so the language thinks of strings as UTF16 and should have a correspondence in the concept of programs
LH: there's just no strong argument for this inconsistency
DH: there's no real practical value for disallowing; there is potential harm for the inconsistency in causing confusion in an already-complicated space
DC: the only real value here is for attackers; no normal code uses this
BE: and maybe code generators
LH: it's just removing an inconsistency that could be a gotcha
LH: there isn't a codePointLength -- is that intentional?
AWB: since strings are immutable could be precomputed
DH: which is why you want it to be provided by the engine, so it can optimize (precompute, cache, whatever)
DH: should it be a function, to signal to programmer that it has a potential cost?
AR: but no other length is a function
DH: fair enough, just spitballing
AWB: what about code point iteration from end to beginning? and also codePointIndexOf? don't have those yet
String Value
Conversion of the input program to code point sequence outside of standard
Trad. \uxxxx escapes represent a single char, creates a single BMP character, 16bit element
Issue: in string values, ?? (Etherpad is broken) === \u1F601 === \uD83D\uDE01 === \u{D83D}\u{DE01}. In identifiers, ?? === \u1F601 !== \uD83D\uDE01 !== \u{D83D}\u{DE01}. Inconsistency that's hard to explain to developers.
DC: This feature is more likely to be used by hackers than developers.
AWB: Two APIs
1
2
3
|
|
What's here, valid surrogate pair?
DH: Mixing the API levels is problematic, should it be scrapped?
...The problem in naming is the "At"
...If we're going to build code point abstractions, we really need a new data type.
NL: ICU has iterators for grapheme clusters, words, sentences, lines – all based on UTF-16 indices. Abstractions don't require different indices.
Need more here.
A. Patterns discussion on es-discuss
Issue: ToObject() on the RHS?
This is currenty specified and enables things like:
let {concat, slice} = "";
This equivalence is desirable and maintain by the current spec:
1
2
3
4
5
|
|
A syntax for pattern matching against objects
1
2
3
4
|
|
1
2
|
|
DH: Pure WAT. Let's pick the most common case and address that. You cannot presume to cover everyone's pet case
What is the right thing to do.
DH: Future pattern matching
LH: Reiteration of correct matching vs intention
More discussion, defer until AR is present
1
2
3
|
|
Consensus without AR is to impute undefined for missing property when destructuring, and if we add pattern matching, use different rules for patterns compared to their destructuring meaning.
BE talked to AR at dinner on day 2, thinks he heard this and may have agreed (to avoid breaking consensus). Need to confirm.
B. Defaults
Explicit undefined value triggerw use of default value initializer.
1
2
3
4
|
|
Issue: is this desirable? dherman and others think an explicit undefined should trigger use of default value. use case in support
1
2
3
4
5
6
7
8
9
|
|
Note same rules are used for both formal parameter default values and destructuring default values.
1
2
3
4
|
|
Need summary. decision: change spec. to make undefine trigger use of default value.*
C. Unresolved issues related to iterator naming/access
spread works on array-like destructuring has rest pattern
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
|
(DH) iterator is a unique name -- can't be public because iterable test not confined to for-of RHS
Destructing and spread - no iterator protocol. (return to existing draft semantics of arraylike — [Cannot be both iterable and array-like])
Array.from should... (this is a change to current specification)
July 23, 2012
Minutes (Notes) of the meeting of jQuery
Location: #jquery-meeting on Freenode
Attending: DaveMethvin, rwaldron, gnarf, timmywil, scott_gonzalez
Time: Noon ET
Official Agenda:
Sizzle
Landed gibson042 pulls
Switched to using Sizzle unit tests with Sizzle HTML
jQuery 1.8RC1?
This week — Thursday?
GET TESTING TO WORK IN BROWSERSTACK (Dave)
What else needs to land?
MUST be released with jQuery UI 1.8.x refresh