Re: Jan 20 meeting notes

2011-01-21 Thread Wes Garland
On Thu, Jan 20, 2011 at 8:25 PM, Brendan Eich bren...@mozilla.com wrote:

 This is the killer for me. Do not want to change === and require all-paths
 runtime test coverage to migrate code into Harmony.


You're bang-on about the end user impact of this change - I would not be
able to migrate any ES5 code to Harmony without full-on testing (not just
automated regression tests), meaning Harmony uptake would be slowed,
particularly in environments like mine where it is most cost effective to
pick a language version and use it across all platforms  (we are heavily
invested in ES, and not just on the browser).

Changing the semantics of an existing language feature smarts: I got bit
pretty hard as a relatively new JS developer with JavaScript 1.2 and am
still wincing. Of course, this is a much smaller change, but we have much
more code nowadays.. :)

Wes

-- 
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


Re: Jan 20 meeting notes

2011-01-21 Thread Mark S. Miller
On Fri, Jan 21, 2011 at 6:09 AM, Wes Garland w...@page.ca wrote:

 On Thu, Jan 20, 2011 at 8:25 PM, Brendan Eich bren...@mozilla.com wrote:

 This is the killer for me. Do not want to change === and require all-paths
 runtime test coverage to migrate code into Harmony.


 You're bang-on about the end user impact of this change - I would not be
 able to migrate any ES5 code to Harmony without full-on testing (not just
 automated regression tests), meaning Harmony uptake would be slowed,
 particularly in environments like mine where it is most cost effective to
 pick a language version and use it across all platforms  (we are heavily
 invested in ES, and not just on the browser).


No argument. In further discussion at the meeting, we also jointly concluded
not to change === and to stick with a separate new eqal operation, spelling
and syntax to be decided.




 Changing the semantics of an existing language feature smarts: I got bit
 pretty hard as a relatively new JS developer with JavaScript 1.2 and am
 still wincing. Of course, this is a much smaller change, but we have much
 more code nowadays.. :)

 Wes

 --
 Wesley W. Garland
 Director, Product Development
 PageMail, Inc.
 +1 613 542 2787 tel:+16135422787 x 102

 ___
 es-discuss mailing list
 es-discuss@mozilla.org
 https://mail.mozilla.org/listinfo/es-discuss




-- 
Cheers,
--MarkM
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


Jan 20 meeting notes

2011-01-20 Thread Waldemar Horwat
Once again, here are my raw meeting notes.

Waldemar

--
Discussion of isNaN and isFinite.

Can/should we fix these in place rather than creating more functions?

Allen:  Existing usage is consistent with normal numeric coercions
done by other operators such as -.

Doug:  Would it be useful to have something that doesn't do the coercions?
Allen:  It would be a convenience.
Erik:  Not sure if it's worth the extra API.

Decided to accept the proposal.


String duplication:  Accepted proposal, but rejected proposed
arbitrary limits of 255 or 4294967296 repetitions.  Per Allen's
comment on wiki, behave as though using ToInteger.


Proxy default handler:
Some trivial bugs in the code:  Calling getOwnPropertyDescriptor etc.
with only one argument.  desc in desc.configurable = true can be
undefined.

set/put/canPut problem discussion.
Allen:  Clean up the list of primitive methods and handlers.
MarkM:  All existing uses of put can be written in terms of set.
Waldemar:  Would want a more generic way of invoking [[set]] rather
than having to instantiate a new default proxy.
Brendan:  Issue remains with prototype chain.

Agreed to move this to proposal stage, with some open issues.


Discussion about typeof result strings:
Dave:  We should set expectation that typeof can return new things in
the future.
Doug:  IE can already return a typeof of unknown.
Waldemar:  If we don't add new return strings, in practice it doesn't
matter what we say in the committee.  If we do add new ones on
occasion, then folks will pay more attention.

Brendan, MarkM:  should have a second hand of fingers as backups to break.

MarkM:  Trouble with === generalization recurring into records that
contain zeroes or NaNs.

Waldemar:  To clarify, I'd very much would want === to be an
equivalence relation but don't think that we can.  A couple examples:
- switch (-0) {... case 0: ...}
- x !== x as an idiom for NaN testing

Discussion of MarkM's semicolon insertion proposal in response to
yesterday's meeting notes.
MarkM:  Parse with and without virtual semicolon and if both succeed then fail.
Waldemar:  How far do you backtrack second parse to see if it fails?
One token?  Rest of program?
One token would be tenable; rest of program, not so much.

Example pro:
a()
(function() {...})();

Examples con:
x = a + b
  + c
  + d;

x = a[longindexexpression]
 [anotherlongindexexpression];

Brendan:  Perhaps it's parentheses that are unique?
Brendan:  Make a pragma to turn off semicolon insertion as a strawman.

Dave:  Recognize real pragmas, not just string literals.

Do we automatically insert a semicolon after the no ASI pragma?


Array create:

Allen would like to eliminate the [[class]] property -- it has too
much undesirable conflation of separate concepts:
- magic length property?
- exploded by Array.concat?
- JSON serialized using [] or {}?
- recognized by Array.isArray?
- postMessage special treatment?
- transmitted via proxies?


Brendan:  Make a quasiquote special interest group for brainstorming?

Allen:  Semi-annual language innovation workshops, independent of
day-to-day standards process?


Proposals on people's radar for Harmony:

Allen:

private names
enhanced object literals
[[Class]]
Object.hash
math enhancements
array protocols
spec MOP vs. proxy MOP
numerics, operator overloading

MarkM:

classes and traits
soft fields
generative module expressibility (deferred compile time of modules
parametrized by modules)
quasis
better random
concurrency
Function.prototype.toString
simple maps and sets

Dave and Brendan:

records and tuples
expression forms
catch guards
generators
array comprehensions
generator expressions
yield*
modules (also includes global object reform)
module loaders
pattern matching
conditional expressions
enumeration
binary data
pragmas
paren-free
versioning

Waldemar:

guards/types
zero-inheritance classes

Erik:

#-functions

Doug:

modulo operator

Luke:

binary data
Function.create

Tom:

extended Object methods

Alex:

promises/deferred/futures
events


Discussion of Brendan's blog post:

case A:
function f(z) {
  return #{x: 42, m: #(a) {a*a}};
}

case B:
function f(z) {
  return #{x: 42, m: #(a) {a*a}, m2: #() {z}};
}

r1 = f(1)
r2 = f(2)

r1 === r2 in case A but maybe not in case B
r1 egal r2?

MarkM: Function comparison should not reveal captured values.

NaN/zero equivalence debate again.

Tuples are immutable and don't contain holes.
Waldemar:  What's a convenient way of replacing the nth element of a
tuple (to make a new tuple)?
Brendan:
t = #[0, 1, 2]
u = #[t[0], 5, t[2]] === #[0, 5, 2]
v = #[...t[0:2], 6] === #[0, 1, 6]

How shallow is #?  Do we need the #'s for the getter and setter below?
#{get #p() {...},
  set #p(q) {...},
  oldSchool: function() ...,
  #newSchool() {Yay!}
}

Declaration syntax:
const #foo(x) {x}  // Redundant const?
let #foo(x) {x}
var #bar(y) {y.z = #() {bar}}  // Illegal?
#() {}   // expression
#f() {}  // expression or declaration
MarkM and 

Re: Jan 20 meeting notes

2011-01-20 Thread Brendan Eich
On Jan 20, 2011, at 4:03 PM, Waldemar Horwat wrote:

 Once again, here are my raw meeting notes.

Thanks for these -- invaluable as always.


 Waldemar:  To clarify, I'd very much would want === to be an
 equivalence relation but don't think that we can.  A couple examples:
 - switch (-0) {... case 0: ...}

Still an e.r. -- {0,-0} is just one equivalence class.

NaN is the hard case but it can be coped with.


 - x !== x as an idiom for NaN testing

This is the killer for me. Do not want to change === and require all-paths 
runtime test coverage to migrate code into Harmony.


 Where do #-functions inherit from?  Do they have call and apply methods?

The idea we seemed to agree on was this analogy:

primitiive string : String object :: #-function : Function object

/be

___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


Re: Jan 20 meeting notes

2011-01-20 Thread Brendan Eich
On Jan 20, 2011, at 5:25 PM, Brendan Eich wrote:

 Where do #-functions inherit from?  Do they have call and apply methods?
 
 The idea we seemed to agree on was this analogy:
 
 primitive string : String object :: #-function : Function object

which implies #-functions delegate to Function.prototype, so apply and call 
work.

This seems to work. ES5 specs primitive wrapping as unobservable, and 
competitive engines don't implicitly wrap, they simply delegate from a 
primitive value to the relevant prototype (for the relevant global object!).

Primitives are here to stay, we have tried to get rid of them several times and 
we can't. #-funcitons, records and tuples go the other way and complete the 
menagerie:

record : Object :: string : String (or ... :: number : Number, or ... :: 
boolean : Boolean)
tuple : Array :: 
#-function : Function :: 

/be
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss