Re: Destructuring object outside of var declaration

2016-11-13 Thread Thaddee Tyl
On Tue, Sep 17, 2013 at 4:27 PM, Brendan Eich wrote: >> Nathan Wall >> September 17, 2013 10:06 AM >> I'm wondering what the best syntax is for object destructuring outside of >> a var declaration. For instance, the following works in Firefox

Re: ES7 - the standard

2016-06-17 Thread Thaddee Tyl
(Small typo, the path was changed to , since that is the direction we go for naming.) ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: ES7 - the standard

2016-06-17 Thread Thaddee Tyl
> Could the spec next time have a non-normative section with the main changes I agree with Peter. For the purpose of being helpful, I tried making a page related to the changes: , so that it can be linked to. As far as I know, there is only

Re: Ideas on type hinting and named parameters

2015-06-09 Thread Thaddee Tyl
I like that syntax. I wonder about the runtime semantics of it, though. (I know TypeHint is a TODO, but…) Is there any implication at runtime of a function that returns a String? Is this: ```js var point = { x Number, y Number }; ``` … the same as this? ```js var point = { x: Number(),

Re: Reflect.type

2015-06-08 Thread Thaddee Tyl
On Sat, Jun 6, 2015 at 6:23 PM, Jordan Harband ljh...@gmail.com wrote: if `class SubThing extends Thing {}`, then `new SubThing instanceof Thing` would be true. Ah! Good. I expected it to fail just like this: ```js function Thing(){} function SubThing(){} SubThing.prototype =

Re: Reflect.type

2015-06-08 Thread Thaddee Tyl
On Mon, Jun 8, 2015 at 4:38 PM, Nick Krempel ndkrem...@google.com wrote: On 8 June 2015 at 15:05, Thaddee Tyl thaddee@gmail.com wrote: Ah! Good. I expected it to fail just like this: ```js function Thing(){} function SubThing(){} SubThing.prototype = Object.create(Thing) // BUG

Re: Reflect.type

2015-06-06 Thread Thaddee Tyl
You suggest a list of types of fixed size. The lack of exposition of user-definable value types is a problem you mention. Having a better typeof is not as useful as having a better instanceof. This would be more valuable: ```js isA(42, Number) === true // Doesn't work with instanceof

Re: why not just import new language into browser?

2015-05-27 Thread Thaddee Tyl
On Wed, May 27, 2015 at 5:01 PM, 李白|字一日 calid...@gmail.com wrote: Web Api, Native Client are all the efforts made to make the browser side to be a platform other than HTML + CSS + JAVASCRIT Parser. Web API (by which I assume you mean the APIs defined in the W3C and WHATWG standards) is

Renaming test262 (was: JavaScript 2015?)

2015-01-23 Thread Thaddee Tyl
On Fri, Jan 23, 2015 at 1:05 AM, Brendan Eich bren...@mozilla.org wrote: Andrea Giammarchi wrote: I mean ... how should I call my browser that is not 100% compliant with HTML5, a fully compliant HTML 1997 browser ? Of course this question arose with respect to HTML5, which was nowhere near

Re: Eval, literal eval, safe eval

2014-12-01 Thread Thaddee Tyl
Michał: Thanks for pointing this out. Strict mode doesn't quite work like I expected it to. I wonder if anything can be done for that Function('')() behaviour. (Weirdly, I was able to fix the function(){ this.a } behaviour.) Additionally, this technique, at least for now, cannot be applied to the

Re: Eval, literal eval, safe eval

2014-11-29 Thread Thaddee Tyl
On Sun, Nov 23, 2014 at 12:38 PM, Florian Bösch pya...@gmail.com wrote: Btw. you can do a sort of sandboxed eval today by overriding all names found in window. There are some caveats however. The so sandboxed code can still access (and change) object internals, such as

Re: Math.TAU

2014-07-03 Thread Thaddee Tyl
On Wed, Jul 2, 2014 at 5:52 PM, A Matías Quezada amati...@gmail.com wrote: 1. Use Math.PI * 2 everywhere 2. Create a TAU constant on every file 3. Create a TAU constant on a single file and require this file from everywhere just for this 4. Do Math.TAU = Math.PI * 2 once somewhere. It even

Loops, Let, Closures

2014-02-12 Thread Thaddee Tyl
The following ES6 code's behaviour puzzled a few developers I know. The results indicated below each snippet are run through SpiderMonkey's implementation. It is related to 13.6.3.2. I believe the wording of the current draft leaves the interaction with closures open to interpretation. for

Re: Standardizing console APIs: Where?

2013-02-27 Thread Thaddee Tyl
On Wed, Feb 27, 2013 at 5:07 PM, Brian Kardell bkard...@gmail.com wrote: On 26/02/2013 23:06 , Brian Kardell wrote: 1. Does anyone else feel like we _should_ have a standard I think that this thread has shown that there are interoperability issues. Given that this is a debugging tool, you

Re: Standardizing console APIs: Where?

2013-02-27 Thread Thaddee Tyl
On Wed, Feb 27, 2013 at 7:55 PM, François REMY francois.remy@outlook.com wrote: In browsers, when logging an object, you can actually click on an arrow to browse through all its properties. Serializing the whole thing on every single console.log, when those happen in a loop, would make

Polyfill for Maps and Sets

2013-01-17 Thread Thaddee Tyl
I believe it is impossible to do even a partially functional polyfill for Maps and Sets in ES5. Indeed, the only way to iterate through it is with the 'for (… of …)' construct, which is sure to break in ES5. I wish there was a way to polyfill it. Something like 'Map.prototype.getKeys' could

Re: Polyfill for Maps and Sets

2013-01-17 Thread Thaddee Tyl
On Thu, Jan 17, 2013 at 8:12 PM, Domenic Denicola dome...@domenicdenicola.com wrote: Dude, do you even read the spec? http://people.mozilla.org/~jorendorff/es6-draft.html#sec-15.14.5.4 So this is just the wiki lacking some updates?

Re: var declarations shadowing properties from Window.prototype

2012-08-16 Thread Thaddee Tyl
On Wed, Aug 15, 2012 at 8:16 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 8/15/12 3:48 AM, Axel Rauschmayer wrote: In FF 14, I’m getting the following results (if there is an element whose ID is foo): $ foo in window false $ foo ReferenceError: foo is not defined

Re: ES Modules: suggestions for improvement

2012-06-26 Thread Thaddee Tyl
On Tue, Jun 26, 2012 at 10:12 AM, John J Barton johnjbar...@johnjbarton.com wrote: As I understand it, two issues drive the need for standardization of modules:   1) we want one environment for all JS,   2) to move beyond the limitations of RequireJS and CommonJS requires parsing, and that is

Re: Default operator strawman - ||| rather than ??

2012-06-13 Thread Thaddee Tyl
On Tue, Jun 12, 2012 at 10:17 PM, David Herman dher...@mozilla.com wrote: On Jun 12, 2012, at 6:33 PM, Thaddee Tyl wrote: My point still stands. Being undefined-specific is arbitrary. CoffeeScript could have been undefined-specific; they were undefined + null-specific, which I believe makes

Re: Default operator strawman - ||| rather than ??

2012-06-12 Thread Thaddee Tyl
On Tue, Jun 12, 2012 at 1:56 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Jun 12, 2012 at 1:37 PM, Peter van der Zee e...@qfox.nl wrote: On Tue, Jun 12, 2012 at 5:29 PM, T.J. Crowder t...@crowdersoftware.com wrote: In the current default operator strawman[1], the operator is ??,

Re: Default operator strawman - ||| rather than ??

2012-06-12 Thread Thaddee Tyl
On Tue, Jun 12, 2012 at 6:11 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Jun 12, 2012 at 2:52 PM, Thaddee Tyl thaddee@gmail.com wrote: On the other hand, non-existent properties are a use-case. CoffeeScript provides a similar feature, but for null properties. For example

Re: Digraphs *and* Unicode pretty-glyphs, for arrows, triangle, etc.

2012-04-05 Thread Thaddee Tyl
On Thu, Apr 5, 2012 at 7:23 AM, Brendan Eich bren...@mozilla.org wrote: From http://www.scala-lang.org/node/4723 (hat tip *Corey Farwell*‏@*frewsxcv* https://twitter.com/#%21/frewsxcv  * ): |=   ⇒   // implemented -  ←   // implemented -   →   // implemented ==  ⩵  ≫   ≪  ⋙ =  

Re: Digraphs *and* Unicode pretty-glyphs, for arrows, triangle, etc.

2012-04-05 Thread Thaddee Tyl
On Thu, Apr 5, 2012 at 5:00 PM, Adam Shannon a...@ashannon.us wrote: I don't see anything inherently wrong with adding some nice sugar to ES, because the people who will be using this math heavy notation will be those who are used to it. The everyday ecmascript programmer probably won't touch

Re: value objects

2012-03-20 Thread Thaddee Tyl
On Tue, Mar 20, 2012 at 2:20 PM, Andrew Paprocki and...@ishiboo.com wrote: On Tue, Mar 20, 2012 at 4:27 AM, Herby Vojčík he...@mailbox.sk wrote: I understand lots of apps want native int64 as soon as possible I would love to see IEEE754r as soon as possible. Being able to represent certain

Re: optional function keyword

2012-03-06 Thread Thaddee Tyl
On Tue, Mar 6, 2012 at 6:50 PM, Isaac Schlueter i...@izs.me wrote: A great many letters have been typed regarding the number of letters in the word function. What if we just made the keyword function entirely optional, dart-style? ShortNamedFunctionDeclaration :Identifier no_linebreak ( 

Re: optional function keyword

2012-03-06 Thread Thaddee Tyl
From: Brendan Eich From: Isaac Schlueter Yes, an identifier is required.  It would not be possible to define an unnamed function in this way. Why not express an anonymous function, though? Definition != expression. As usual, an expression *statement* could not start with ( and consist

Re: What should Map iteration do?

2012-02-16 Thread Thaddee Tyl
Related: I cannot find the reason why sets and maps were harmoni'ed with classes[1]. They do support `mySet[foo]` for `mySet.has(foo)` and `for (something of mySet)` for iteration, do they not? Classes don't have operator overloading, so using classes makes it harder to see the usual syntax form.

Re: Two kinds of [] (was: Re: shortcuts for defining block-local private names, plays nicely with @foo syntax)

2012-01-28 Thread Thaddee Tyl
On Sat, Jan 28, 2012 at 1:10 AM, Brendan Eich bren...@mozilla.org wrote: Tom Van Cutsem mailto:tomvc...@gmail.com January 27, 2012 10:53 AM    Off-topic: What is the recommended style for naming modules?    Capitalized and camel-cased? It’s nothing I couldn’t get used to,    but it seems

Re: Block lambda is cool, its syntax isn't

2012-01-18 Thread Thaddee Tyl
On Wed, Jan 18, 2012 at 10:28 AM, Gavin Barraclough barraclo...@apple.comwrote: Just a thought, has a prefix ^ been considered? A lambda that takes no arguments could be: ^{ /*...*/ } And a lambda with some arguments: ^(x,y){ /*...*/ } I just find this really readable, the syntax for

Re: Octal literals have their uses (you Unix haters skip this one)

2012-01-12 Thread Thaddee Tyl
Can't we just have free competition between 0o644 and 0644? Add the former, and we'll see which wins in real code! If 0o644 wins, and if people like Doug Crockford advocate the drop of 0644, we may then consider including this in a new version of Strict Mode. Furthermore, I'd like to weigh in

Re: Octal literals have their uses (you Unix haters skip this one)

2012-01-12 Thread Thaddee Tyl
On Thu, Jan 12, 2012 at 9:57 PM, Axel Rauschmayer a...@rauschma.de wrote: If we were willing to add octal with a clear prefix I would be fine with that, for consistency with hex, I'd lean towards 0o..., but I'm open to any suggestions that people may wish to add.  Personally I'd also like a

Re: Block lambda is cool, its syntax isn't

2012-01-12 Thread Thaddee Tyl
On Thu, Jan 12, 2012 at 11:23 PM, François REMY fremycompany_...@yahoo.fr wrote: Am I wrong if I say there not a bigger issue with block lambda than with the current object notation on the matter? I mean, does that code mean anything useful?   function() {       {|a,b| a+b};   } If not

Re: Summary: prototypes as classes

2011-06-30 Thread Thaddee Tyl
From: Axel Rauschmayer a...@rauschma.de On the other hand people may find Point.new(x, y) as intuitive, as they will think of ruby instead of java. As an aside, you can see API code for the above functionality here: - https://github.com/Gozala/selfish [Irakli, updated] -

Re: May 24-26 rough meeting notes

2011-05-30 Thread Thaddee Tyl
On Mon, May 30, 2011 at 6:55 AM, Brendan Eich bren...@mozilla.com wrote: On May 29, 2011, at 2:58 PM, Thaddee Tyl wrote: ... I believe that, given the fact that browsers will implement ES.next incrementally, we should find a way to allow graceful fallback, rather than version-driven

Re: May 24-26 rough meeting notes

2011-05-29 Thread Thaddee Tyl
Date: Sat, 28 May 2011 12:57:04 -0700 From: Brendan Eich bren...@mozilla.com http://www.mail-archive.com/es-discuss@mozilla.org/msg05005.html had the example I was trying to reconstruct from memory at last week's meeting: script-if type=application/ecmascript;version=6  // new.js

Re: May 24-26 rough meeting notes

2011-05-29 Thread Thaddee Tyl
29, 2011, at 6:45 AM, Thaddee Tyl wrote: Consensus on moving some form of versioning into Harmony.  The strawman is a bit light at this time, so no specifics yet. A lot of the above looks like HTML. Isn't versioning that depends on HTML out of scope for the ECMAScript standard? Yes, so

Re: May 24-26 rough meeting notes

2011-05-29 Thread Thaddee Tyl
On Sun, May 29, 2011 at 10:00 PM, Brendan Eich bren...@mozilla.com wrote: On May 29, 2011, at 12:55 PM, Thaddee Tyl wrote: Don't be upset! Not at all, I'm simply skeptical (and saucy in saying so) about jurisdictional fights this early in thinking creatively about cross-cutting solutions

Re: arrow syntax unnecessary and the idea that function is too long

2011-05-07 Thread Thaddee Tyl
On Sat, May 7, 2011 at 6:31 PM, Peter Michaux petermich...@gmail.com wrote: On Sat, May 7, 2011 at 9:16 AM, Thaddee Tyl thaddee@gmail.com wrote: I believe that David Bruant has a good point. We *need* a shorter syntax because we advocate the use of map/reduce, etc., which require simple