Re: Is anyone able to reach wiki.ecmascript.org ?

2015-10-10 Thread Russell Leggett
Down for me too On Sat, Oct 10, 2015 at 10:27 AM Calvin Metcalf wrote: > Not just you > http://downforeveryoneorjustme.com/wiki.ecmascript.org > > On Sat, Oct 10, 2015, 9:52 AM Mark S. Miller wrote: > >> Seems to be down. Not answering pings. >> >>

Re: Move es-discuss to discuss.webplatform.org?

2015-06-23 Thread Russell Leggett
If not, does Discourse support email as a first-class subscription mechanism? That (plus mute) might help. I haven't used discourse a ton, but according to the features page: http://www.discourse.org/about/ They support email notifications and replies, as well as an opt in mailing list

Re: Move es-discuss to discuss.webplatform.org?

2015-06-22 Thread Russell Leggett
On Fri, Jun 19, 2015 at 5:21 PM, // ravi ravi-li...@g8o.net wrote: On Jun 19, 2015, at 5:12 PM, C. Scott Ananian ecmascr...@cscott.net wrote: No, thank you.​ Email clients are the ultimate forum aggregators. +1 on “No, thank you. Email works, email has are full-featured clients, do

Re: classes and enumerability

2014-12-23 Thread Russell Leggett
On Wednesday, December 24, 2014, Kevin Smith zenpars...@gmail.com wrote: The question is: what should ES6 classes choose as the default? What's the most useful default, independent of various backward-looking consistencies? What, if the future is bigger than the past, would be best? Framed

Re: arrow functions and dart

2014-09-23 Thread Russell Leggett
We already have two (three? not sure about JSC) engines which implement arrow functions, plus Traceur. It seems silly to talk about changing the syntax at this point when people have shown they’re already happy with the arrow. Agreed. This is basically bikeshedding after the bike shed has

Re: Bundling vs sending serialized dependency graph

2014-08-21 Thread Russell Leggett
Not sure if my real world use case would be super helpful here, but just in case, here it is. The app I work on is a very large single page app - over 150,000 lines of JS across more than 2000 files. Uncompressed, unminified, and concatenated together, it weighs in at close to 10MB. We've been

Re: WeakMap not the weak needed for zombie views

2014-07-06 Thread Russell Leggett
Sorry to take this on a tangent from the topic of WeakRefs, but the way I've solved the OP's problem in my own code is by tying anything that needs cleanup to element ids. Any time I need to update the HTML, I go through a central method that crawl that part of the dom and purges it using the ids

Re: ModuleImport

2014-06-27 Thread Russell Leggett
On Fri, Jun 27, 2014 at 3:41 AM, Michał Gołębiowski m.go...@gmail.com wrote: On Thu, Jun 26, 2014 at 4:50 PM, Russell Leggett russell.legg...@gmail.com wrote: //import a single named export import foo from bar; //import multiple named exports import foo, baz from bar

Re: ModuleImport

2014-06-27 Thread Russell Leggett
On Fri, Jun 27, 2014 at 3:52 AM, Michał Gołębiowski m.go...@gmail.com wrote: On Fri, Jun 27, 2014 at 9:44 AM, Russell Leggett russell.legg...@gmail.com wrote: No, that example would be: import mkdirp as mkdir; Its actually shorter than node. But in current proposal the module

Re: ModuleImport

2014-06-27 Thread Russell Leggett
Ok, so can I just ask a serious question. I looked at the mkdirp library, and in their own documentation, they use: var mkdirp = require('mkdirp'); So let's say in the new world order, no default exports, this is a named export mkdirp. Is it *really* that bad a thing to just use the

Re: ModuleImport

2014-06-27 Thread Russell Leggett
On Fri, Jun 27, 2014 at 10:11 AM, Kevin Smith zenpars...@gmail.com wrote: var mkdirp = require('mkdirp'); Exactly. In ES, you would see this: import { mkdrip } from mkdirp; Python has a somewhat similar module system, and import-renaming is the exception, not the rule. Also,

Re: ModuleImport

2014-06-26 Thread Russell Leggett
Now the author can choose to export more things later without making breaking changes to the module. The only downside to this is the (apparently mandatory) curly braces around the imported object. If single export/import becomes the convention with ES6 modules then users will be forced to

Re: ModuleImport

2014-06-26 Thread Russell Leggett
I like the fact that this doesn't look like destructuring, since variable binding is different from destructuring assignment. Could ``` import foo, baz from bar as bar; ``` allowed simultanous import of named exports and the module itself? If so, the grammar gains a pleasing regularity.

Re: Bytecode

2014-05-16 Thread Russell Leggett
Regarding the original topic of this thread: I think there have been many many prior discussions of a standardised bytecode on es-discuss, and people should really be reading those before bringing this up again. It’s not going to happen as no one has ever demonstrated an actual benefit over

Re: module exports

2014-03-14 Thread Russell Leggett
I don't understand this claim, any legal AssignmentExpression form is allowed. I've said this before, but without the equals it looks too much like a declaration: export default class C {} var c = new C(); // No C defined, WTF? Why is this surprising? It is surprising

Re: Protocol library as alternative to refinements (Russell Leggett)

2013-10-23 Thread Russell Leggett
On Tue, Oct 22, 2013 at 4:50 PM, Dean Landolt d...@deanlandolt.com wrote: On Tue, Oct 22, 2013 at 4:07 PM, Russell Leggett russell.legg...@gmail.com wrote: On Tue, Oct 22, 2013 at 2:34 PM, Benjamin (Inglor) Gruenbaum ing...@gmail.com wrote: On Tue, Oct 22, 2013 at 8:10 PM, Russell

Re: Protocol library as alternative to refinements (Russell Leggett)

2013-10-23 Thread Russell Leggett
On Wed, Oct 23, 2013 at 2:57 PM, Benjamin (Inglor) Gruenbaum ing...@gmail.com wrote: Yes, this looks solid and definitely like something I'll use. I'll try to go through use cases and find problems during the weekend. What do you think would be the fastest way to get a prototype something

Re: Protocol library as alternative to refinements (Russell Leggett)

2013-10-22 Thread Russell Leggett
I can see most of your examples involve the interaction between the protocol method and a method supplied on the object itself... They definitely complicate things... I guess I would say that I would have this throw an error. ... Skipping foo on the object because its not a function seems

Re: Protocol library as alternative to refinements (Russell Leggett)

2013-10-22 Thread Russell Leggett
Say you have an object for which you want to implement the Cowboy and Canvas protocols (to borrow /be's favorite example). Both implement a draw method, but when you try to import from both protocols you'll naturally have to rename one or both. Now say you want to override Cowboy's `draw`

Re: Protocol library as alternative to refinements (Russell Leggett)

2013-10-22 Thread Russell Leggett
On Tue, Oct 22, 2013 at 12:53 PM, Dean Landolt d...@deanlandolt.com wrote: On Tue, Oct 22, 2013 at 12:44 PM, Russell Leggett russell.legg...@gmail.com wrote: Say you have an object for which you want to implement the Cowboy and Canvas protocols (to borrow /be's favorite example). Both

Re: Protocol library as alternative to refinements (Russell Leggett)

2013-10-22 Thread Russell Leggett
On Tue, Oct 22, 2013 at 2:34 PM, Benjamin (Inglor) Gruenbaum ing...@gmail.com wrote: On Tue, Oct 22, 2013 at 8:10 PM, Russell Leggett russell.legg...@gmail.com wrote: Revised algorithm: 1. If receiver has protocol method symbol as a property, use that as override. 2. Try to use

Protocol library as alternative to refinements

2013-10-21 Thread Russell Leggett
This thread is based on conversations in the Scoped binding of a method to an object discussion. I suggested using the proposed bind operator :: as an alternative, and hinted at way of doing so polymorphically. Given that the other discussion on refinements just popped up, I figured I might as

Re: Protocol library as alternative to refinements (Russell Leggett)

2013-10-21 Thread Russell Leggett
On Mon, Oct 21, 2013 at 3:17 PM, Benjamin (Inglor) Gruenbaum ing...@gmail.com wrote: Russell Leggett russell.legg...@gmail.com wrote: https://gist.github.com/genericallyloud/7086380 Very interesting. // 4. use the default if available what's the default in #4? The protocol's default

Re: Protocol library as alternative to refinements (Russell Leggett)

2013-10-21 Thread Russell Leggett
I'll preface this by saying that I haven't made a formal proposal and this isn't an actual library. You're doing a good job of spotting some undefined behavior which would probably be better defined by trying it out. I'll give my opinions on them, but it could all use a good test drive before

Re: Scoped binding of a method to an object

2013-10-15 Thread Russell Leggett
On Tue, Oct 15, 2013 at 3:45 AM, Benjamin (Inglor) Gruenbaum ing...@gmail.com wrote: Brendan Eich bren...@mozilla.com wrote: We already have good motivation for :: anyway, as sugar for bind. This gives relief to the OO side of the expression problem trade-off by allowing lexical bindings to

Re: Scoped binding of a method to an object

2013-10-15 Thread Russell Leggett
On Tue, Oct 15, 2013 at 11:59 AM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: On Oct 15, 2013, at 7:22 AM, Russell Leggett wrote: If we didn't have :: (which we don't now), I think people will continue to simply use functions like what underscore does. Personally, I'm ok

Re: Scoped binding of a method to an object

2013-10-15 Thread Russell Leggett
If we didn't have :: (which we don't now), I think people will continue to simply use functions like what underscore does. Personally, I'm ok with that I think using stuff like _.shuffle([1,2,3,4,5]) is not as nice and worse than [1,2,3,4,5].shuffle() . Especially in a more functional

Re: Scoped binding of a method to an object

2013-10-15 Thread Russell Leggett
The big issue I see here is chaining. `_.reduce(_.map(_.filter([1,2,3,4,5],x=x%2 === 0),x=2*x),(x,y)=x+y)` Is a lot less readable than `[1,2,3,4,5].filter(x=x%2===0).map(x=2*x).reduce((x,y)=x+y))` P.S. This really doesn't look too shabby to me: import {reduce,map,filter} from

Re: Scoped binding of a method to an object

2013-10-15 Thread Russell Leggett
Using your proposed underscore2 (OO-underscore?) with :: is no more verbose than underscore.js (underscore1), and it has the chaining not inside-out-composing win some may prefer. I'm glad you noticed the 2. Perhaps oonderscore? :) We should not argue only about taste, and bind (::) has a

Re: Scoped binding of a method to an object

2013-10-15 Thread Russell Leggett
On Tue, Oct 15, 2013 at 4:28 PM, Benjamin (Inglor) Gruenbaum ing...@gmail.com wrote: Wait, I think maybe I did not understand what you meant before. Are we talking about using `::` for infixing the first parameter of the function? As in `func(a,b,c)` being the same as `a::func(b,c)` ? Not

Re: Scoped binding of a method to an object

2013-10-14 Thread Russell Leggett
I get that this isn't really the same, but I think one really viable solution for the scoped method problem (which is really just the expression problem, right?) is the proposed bind operator http://wiki.ecmascript.org/doku.php?id=strawman:bind_operator It doesn't use dots, so it won't mask the

Re: Scoped binding of a method to an object

2013-10-14 Thread Russell Leggett
On Mon, Oct 14, 2013 at 4:05 PM, Brendan Eich bren...@mozilla.com wrote: Russell Leggett mailto:russell.leggett@gmail.**comrussell.legg...@gmail.com October 14, 2013 12:51 PM I get that this isn't really the same, but I think one really viable solution for the scoped method problem (which

Re: Generic Bundling

2013-10-14 Thread Russell Leggett
This is probably the wrong place to ask the question, but I was just thinking about the whole HTTP 2 server push thing. In a way, it surely wins in the # of requests camp if it works as described - you request index.html and the server intelligently starts pushing you not only index.html, but also

Re: Generic Bundling

2013-10-11 Thread Russell Leggett
Just wanted to point out a couple of previous attempts at something similar to generic bundling and the reactions it got, because so far it hasn't panned out. Way back in 2008, it was my one and only real contribution to the whatwg list before getting a little frustrated and moving on:

Re: Generic Bundling

2013-10-11 Thread Russell Leggett
Not sure if this changes anything, carry on. Server push is happening as part of HTTP 2.0. Do you have a use case in which it's insufficient? Not sure if this was directed at me or Jorge, but in case it was directed at me, I wasn't actually advocating for this anymore, simply acting as a

Re: Generic Bundling

2013-10-11 Thread Russell Leggett
As you can see the resource packages attempt got dropped. Perhaps this proposal will go through because it is tied to the module loader? It's sad. What happened? Why was it ditched? Was it, perhaps, too ahead of its time? Let's try again :-) As you can see, it basically fell to the same

Re: Generic Bundling

2013-10-11 Thread Russell Leggett
On Fri, Oct 11, 2013 at 9:57 AM, Jeremy Darling jeremy.darl...@gmail.comwrote: HTTP 2.0 will require changes to servers for it to work properly, it will also require that developers learn a bit more about the pipeline or rely on some vendor to implement the smarts for them. Asset Bundling on

Re: The Paradox of Partial Parametricity

2013-05-28 Thread Russell Leggett
On Tue, May 28, 2013 at 9:55 AM, Tab Atkins Jr. jackalm...@gmail.comwrote: On Mon, May 27, 2013 at 9:53 AM, Russell Leggett russell.legg...@gmail.com wrote: On Mon, May 27, 2013 at 11:04 AM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Mon, May 27, 2013 at 7:29 AM, Russell Leggett

Re: The Paradox of Partial Parametricity

2013-05-28 Thread Russell Leggett
I'm not arguing 'chain' be removed. I'm convinced at this point its worth including, I'm just debating the method name here. Sorry if it's just bikeshedding at this point, but on the face of it, the two methods seem hard to distinguish, and while 'chain' might be a better name for some

Re: The Paradox of Partial Parametricity

2013-05-27 Thread Russell Leggett
On Sun, May 26, 2013 at 1:38 PM, Brendan Eich bren...@mozilla.com wrote: Russell Leggett wrote: I'm sorry if I have just missed it trying to keep up to date, but what are the compelling use cases. AsyncTable with promises as values. No name mangling. I prefer then and chain. One more

Re: The Paradox of Partial Parametricity

2013-05-26 Thread Russell Leggett
On Sat, May 25, 2013 at 6:00 PM, Brendan Eich bren...@mozilla.com wrote: Tab Atkins Jr. wrote: AP2 from Mark's slides: AP2 (Based on Tab’s latest) • Q.fulfill // lifting • Q() // autolifting, resolve • p.then // deep flattening • p.flatMap // “chain” Apologies for being a

Re: ES6,ES7,ES8 and beyond. A Proposed Roadmap.

2013-04-22 Thread Russell Leggett
Persistent immutable data structures would be a big usability improvement in their own right. In a world where it's just as cheap and convenient to use immutable structures as it is to depend on side-effects, code that does this (including your own) would be a whole lot easier to reason about

Re: A case for removing the seal/freeze/isSealed/isFrozen traps

2013-02-15 Thread Russell Leggett
On Fri, Feb 15, 2013 at 9:24 AM, Erik Arvidsson erik.arvids...@gmail.comwrote: ... and security sensitive code could just ban/alter the reflection methods. On Feb 15, 2013 8:29 AM, Brandon Benvie bben...@mozilla.com wrote: I definitely agree that something like preventAccidentalExtensions

Re: Refutable pattern

2013-02-07 Thread Russell Leggett
I think prefix ? is easier from a reading point of view, but I'm not really married to either. Agreed, and I posted mainly to try to get to consensus. Prefix-? looks like it is in the lead. I think for the case of a long pattern with the ? outside the {}s, a prefix ? is easier to read.

Re: Minimal Module System Proposal

2013-02-07 Thread Russell Leggett
On Thu, Feb 7, 2013 at 9:25 PM, Kevin Smith khs4...@gmail.com wrote: Thanks, but let's not jump to any conclusions. I'm the champion of modules and wasn't even able to be a part of the discussion for family reasons. We can't make any judgment about the status of modules, or plans for reacting

Re: Ducks, Rabbits, and Privacy

2013-01-23 Thread Russell Leggett
Perhaps I should have included a link: http://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/plugin/domado.js?spec=svn5223r=5223#359 The idea is that 'Confidence' introduces a 'class with private fields' as if in Java: each object which has a private state record is

Re: Security Demands Simplicity (was: Private Slots)

2013-01-18 Thread Russell Leggett
I've been stewing on this some more, and I realized something potentially very interesting. If we use weakmaps in the manner specified by Kevin (with Mark's help), I think we've very nearly added nominal typing to classes. Assuming this privacy behavior was tied to classes, and assuming only

Re: Security Demands Simplicity (was: Private Slots)

2013-01-17 Thread Russell Leggett
On Thu, Jan 17, 2013 at 9:40 PM, Kevin Smith khs4...@gmail.com wrote: It seems as if this approach to private class members also allows us to describe private methods in a convenient way. Private methods can be attached to the _prototype_ of the private field object, thus avoiding

Re: Private Slots

2013-01-16 Thread Russell Leggett
On Wed, Jan 16, 2013 at 3:48 PM, Brendan Eich bren...@mozilla.com wrote: Mark S. Miller wrote: My position on private symbols. My position on classes is and has always been that classes are worth introducing into the language*only* if they give us, or can be used with, an affordable

Re: Private Slots

2013-01-15 Thread Russell Leggett
I have suggested before that it would be good to put control over object iteration into the hands of the object authors, by enabling them to override the slot iteration method. One would need to find a way of doing so without exposing private names, but it should allow object authors to

Re: fail-fast object destructuring (don't add more slop to sloppy mode)

2013-01-02 Thread Russell Leggett
On Wed, Jan 2, 2013 at 1:13 PM, Brendan Eich bren...@mozilla.com wrote: Here I part company only on syntax: r = o?.p.q {p?: {q: r}} = o P=o.p; Q=o?.q{p: P, q?: Q} = o And of course, the short-hand works: p=o.p; q=o?.q{p, q?} = o I love this. +1000. As I've

Re: excluding features from sloppy mode

2012-12-28 Thread Russell Leggett
On Fri, Dec 28, 2012 at 6:06 AM, Kevin Smith khs4...@gmail.com wrote: What about node code? Well, node modules are not ES6 modules. They are functions with an implicit head and braces. So implicit strict mode, applied to ES6 modules, would not apply to them. Sorry, I should have

Re: excluding features from sloppy mode

2012-12-28 Thread Russell Leggett
On Fri, Dec 28, 2012 at 9:53 AM, Kevin Smith khs4...@gmail.com wrote: Sorry, I should have expanded further - that was my point. Node is a case where I can see classes being used without modules. I imagine native class support will hit v8 soon enough, and I could see people start using them

Re: excluding features from sloppy mode

2012-12-27 Thread Russell Leggett
On Dec 27, 2012, at 8:54 AM, Kevin Smith khs4...@gmail.com wrote: Since any new code will likely be written as a module (even in the near-term, transpiled back to ES5), this would be the ideal scenario. Which this do you mean? modules (in or out of line) implying strict mode can target

Re: A Variation on ES Modules

2012-12-19 Thread Russell Leggett
I will admit - this seems very readable to me, and I don't feel like I have a lot of questions about edge cases. I would be pretty satisfied with it. This might be a bit of a tangent, but there is something else that's been bugging me. It's almost 2013 now, and we're fill in the gaps for ES to be

Re: Module Comments

2012-12-07 Thread Russell Leggett
On Thu, Dec 6, 2012 at 1:46 PM, Brendan Eich bren...@mozilla.org wrote: David Herman wrote: Cool, definitely want the plain identifier form, it's part of the binding (and destructuring) pattern language. Well, the thing is it isn't consistent with the destructuring meaning: dropping the

Re: Why are non-method properties in a prototype an anti-pattern?

2012-11-07 Thread Russell Leggett
On Wed, Nov 7, 2012 at 12:27 PM, Kevin Smith khs4...@gmail.com wrote: Any other reasons for why they are discouraged? This footgun: function MyClass() { this.value = 1; // OK this.list.push(0); // Modifying the list for every instance - probably not intended. }

Re: `free` operator

2012-10-26 Thread Russell Leggett
Yehuda's action at a distance complaint is definitely a valid concern. However, note that an object can't be freed unless you have a reference to the object. Thus, any code that would set my reference to undefined could only do so if it was also capable of mutating the object in any other

Re: Avoiding overloading the term “prototype”

2012-10-22 Thread Russell Leggett
By the way, let deprecate (that is, recommend not to use) __proto__ and introduce @parent (or other term) instead, while both having the same behaviour. I'm not sure what to call it, but I think this would be much nicer than __proto__ and consistent with the new way of doing things. Here are

Re: Modules, Concatenation, and Better Solutions

2012-10-17 Thread Russell Leggett
On Wed, Oct 17, 2012 at 1:59 PM, Kevin Smith khs4...@gmail.com wrote: So any reference to A (not necessarily dotted) in the outer module triggers hoisted initialization of A? And if no such reference exists module A is essentially deal code? So side-effects would be allowed by the

Re: Feed back and proposal for modules: allow importing ES5 files

2012-09-25 Thread Russell Leggett
On Tue, Sep 25, 2012 at 12:08 AM, 程劭非 csf...@gmail.com wrote: Thanks, Claus and Alex, I've looked at the Loader but it seems to be async? I know there are many ways to load multiple files together(iframe, XHR, script element and datauri for browser host) but what I'm suggesting is to make

Re: Save modification made by a ecmascript on svg file

2012-09-11 Thread Russell Leggett
This mailing list is for discussion about the ecmascript language design itself. I actually think stackoverflow.com is your best bet for your type of question. To give you my own very brief take on it - browser save always just saves the original document it downloaded, whether html or svg. If you

Re: Hash style comments

2012-08-08 Thread Russell Leggett
Not to keep being down on this post, but as long as YAML adds JS style comments, wouldn't JSON still be a strict subset? On Wed, Aug 8, 2012 at 12:57 PM, Jussi Kalliokoski jussi.kallioko...@gmail.com wrote: And even if it wasn't, it wouldn't make much sense to use the only punctuation symbol

Re: Terminology: named data properties

2012-08-07 Thread Russell Leggett
On Tue, Aug 7, 2012 at 8:04 AM, Dean Landolt d...@deanlandolt.com wrote: On Mon, Aug 6, 2012 at 5:38 PM, Axel Rauschmayer a...@rauschma.de wrote: What is the endgame? Add more terminology to the spec or try to define a term to be adopted into the spoken lexicon? The former doesn't

Re: The Name of the Name

2012-08-01 Thread Russell Leggett
Symbol is not bad. I think people could use it for similar purposes as Ruby's symbols, but it might get a little confusing at the differences - not that it should stop us if we like the word. Some other ideas: Key, Signature (unforgeable), Token, Privilege - Russ On Wed, Aug 1, 2012 at 5:06

Re: ES Modules: suggestions for improvement

2012-07-27 Thread Russell Leggett
On Tue, Jul 24, 2012 at 5:11 PM, Brendan Eich bren...@mozilla.org wrote: Sam Tobin-Hochstadt wrote: But I don't think we should ban people from using `import *` because sometimes it's hard to reason about. Just to focus on import *, here's where I am: I'm in favor of deferring (not to

Re: fail-fast object destructuring

2012-07-11 Thread Russell Leggett
On Wed, Jul 11, 2012 at 7:14 AM, Andreas Rossberg rossb...@google.comwrote: On 10 July 2012 10:17, Russell Leggett russell.legg...@gmail.com wrote: Yes, I think that arrays are likely the strongest case for ? on bindings. Something like this would be nice: let [first,last,?company

Re: fail-fast object destructuring

2012-07-11 Thread Russell Leggett
On Wed, Jul 11, 2012 at 7:16 AM, Andreas Rossberg rossb...@google.comwrote: On 10 July 2012 10:47, Russell Leggett russell.legg...@gmail.com wrote: Another thing that I was also thinking is that it might look a little nicer if the ? was a post-fix instead of a pre-fix. let {first, last

Re: fail-fast object destructuring

2012-07-11 Thread Russell Leggett
On Wed, Jul 11, 2012 at 11:31 AM, Andreas Rossberg rossb...@google.comwrote: On 11 July 2012 17:20, Russell Leggett russell.legg...@gmail.com wrote: On Wed, Jul 11, 2012 at 7:14 AM, Andreas Rossberg rossb...@google.comwrote: AFAICS, '?' on a variable itself would always be redundant, because

Re: fail-fast object destructuring

2012-07-11 Thread Russell Leggett
On Wed, Jul 11, 2012 at 1:06 PM, Brendan Eich bren...@mozilla.org wrote: Russell Leggett wrote: Russell asked about 'length' -- per a previous thread, I thought we agreed that one [[Get]] of 'length' would be done before matching if and only if the array literal contains

Re: New Guy with ECMA Question

2012-07-11 Thread Russell Leggett
Sorry, John, this is not the right area. This group is for the discussion of the design of the language itself. I think the best place for you to ask this question is stackoverflow.com Good luck! - Russ On Wed, Jul 11, 2012 at 1:46 PM, John eclip...@yahoo.com wrote: Hello, I am not even

Re: fail-fast object destructuring

2012-07-10 Thread Russell Leggett
On Mon, Jul 9, 2012 at 4:04 PM, Brendan Eich bren...@mozilla.org wrote: Russell Leggett wrote: Options type objects: let {url,callback,?errback} = options; This lets you very clearly decompose an object and declaratively show which values are optional and which ones are not. If all

Re: fail-fast object destructuring

2012-07-10 Thread Russell Leggett
Another thing that I was also thinking is that it might look a little nicer if the ? was a post-fix instead of a pre-fix. let {first, last, company?} = contact; I might be missing why this wouldn't work out, but it aesthetically just looks right to me. It looks like the regex operator, and

Re: fail-fast object destructuring

2012-07-09 Thread Russell Leggett
On Fri, Jul 6, 2012 at 1:37 PM, Brendan Eich bren...@mozilla.org wrote: Andreas Rossberg wrote: We should talk more at this month's TC39 meeting, but I see a sharp divide ahead: 1. Choose (A), possibly with modification, either rejecting useful pattern matching decisively,

Re: fail-fast object destructuring

2012-07-09 Thread Russell Leggett
::faceplam:: On Mon, Jul 9, 2012 at 12:36 PM, Andreas Rossberg rossb...@google.comwrote: I agree with almost everything you said. But just to clarify, I think you actually meant refutable everywhere you said irrefutable. /Andreas On 9 July 2012 18:19, Russell Leggett russell.legg

Re: fail-fast object destructuring

2012-07-09 Thread Russell Leggett
::double-facepalm:: On Mon, Jul 9, 2012 at 12:54 PM, Russell Leggett russell.legg...@gmail.comwrote: ::faceplam:: On Mon, Jul 9, 2012 at 12:36 PM, Andreas Rossberg rossb...@google.comwrote: I agree with almost everything you said. But just to clarify, I think you actually meant refutable

Re: fail-fast object destructuring

2012-07-09 Thread Russell Leggett
On Mon, Jul 9, 2012 at 12:36 PM, Andreas Rossberg rossb...@google.comwrote: I agree with almost everything you said. But just to clarify, I think you actually meant refutable everywhere you said irrefutable. /Andreas So I corrected my bonehead mistake, here it is again in case anybody

Re: Static Module Resolution

2012-07-06 Thread Russell Leggett
On Fri, Jul 6, 2012 at 7:30 AM, Aymeric Vitte vitteayme...@gmail.comwrote: Le 06/07/2012 03:17, Brendan Eich a écrit : Aymeric Vitte wrote: Then the sync xhr is absurd ? It's a botch that developers avoid , else they jank the user interface. Yes, as far as you can or as far as you want

Re: Static Module Resolution

2012-07-06 Thread Russell Leggett
On Fri, Jul 6, 2012 at 10:58 AM, Aymeric Vitte vitteayme...@gmail.comwrote: Do we have a survey of the use of sync against async ? I think it would show that sync is much more used (wrongly or easy way again, but...). I completely disagree with this. Most developers without the

Re: A few more questions about the current module proposal

2012-07-05 Thread Russell Leggett
Sorry I haven't gotten a chance to get into this thread sooner, let me catch up a bit: On Wed, Jul 4, 2012 at 2:56 PM, Jussi Kalliokoski jussi.kallioko...@gmail.com wrote: On Wed, Jul 4, 2012 at 9:13 PM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: On Wed, Jul 4, 2012 at 12:29 PM, Jussi

Re: A few more questions about the current module proposal

2012-07-05 Thread Russell Leggett
Oh, I also meant to ask - I do have a question of my own. It seems so basic, but I can't figure it out. If I have a file that contains two modules - let's say in foo.js --- foo.js module Foo { export let x = 42; } module Bar { export let y = 12;

Re: default `deleteCount` value of `Array.prototype.splice`

2012-07-04 Thread Russell Leggett
On Tue, Jul 3, 2012 at 6:28 PM, Brendan Eich bren...@mozilla.org wrote: Allen Wirfs-Brock wrote: On Jul 3, 2012, at 9:07 AM, Brendan Eich wrote: Russell Leggett wrote: ... The spec states: When the splice method is called with two or more arguments... - therefore, a.splice(2); leads

Re: default `deleteCount` value of `Array.prototype.splice`

2012-07-03 Thread Russell Leggett
On Tue, Jul 3, 2012 at 9:09 AM, John-David Dalton john.david.dal...@gmail.com wrote: Just checked and IE8 returns `[]` correctly w! On Tue, Jul 3, 2012 at 8:49 AM, John-David Dalton john.david.dal...@gmail.com wrote: I recently saw something like var a = ['a', 'b', 'c', 'd'];

Re: Would some like Object.inspect(myObj) be useful?

2012-06-14 Thread Russell Leggett
On Thu, Jun 14, 2012 at 5:42 AM, Hemanth H.M hemanth...@gmail.com wrote: Was just wondering if something like *Object.inspect(myObj) *would give all the attributes of that particular object. What would this function return? There's already an

Re: Function length

2012-06-13 Thread Russell Leggett
On Wed, Jun 13, 2012 at 5:29 AM, Andreas Rossberg rossb...@google.comwrote: On 12 June 2012 23:57, Russell Leggett russell.legg...@gmail.com wrote: This thread gave me an interesting idea on how to possibly attack pattern matching in ES6 with no new syntax, and still leave room for more

Re: Function length

2012-06-13 Thread Russell Leggett
On Wed, Jun 13, 2012 at 12:42 PM, Andreas Rossberg rossb...@google.comwrote: On 13 June 2012 15:25, Russell Leggett russell.legg...@gmail.com wrote: On Wed, Jun 13, 2012 at 5:29 AM, Andreas Rossberg rossb...@google.com If I understand this correctly, then it will require every function

Re: Rest parameter syntax

2012-06-12 Thread Russell Leggett
On Tue, Jun 12, 2012 at 11:26 AM, Rick Waldron waldron.r...@gmail.comwrote: On Tue, Jun 12, 2012 at 10:38 AM, Felix Böhm esdisc...@feedic.com wrote: Per definition, rest parameters always need to be at the end of a FormalParameterList. I was wondering if this limitation could be liftet.

Re: Function length

2012-06-12 Thread Russell Leggett
On Mon, Jun 11, 2012 at 3:50 PM, Brendan Eich bren...@mozilla.org wrote: Irakli Gozalishvili wrote: Sorry for not being clear about this. Here is a simplified example of the implementation: https://gist.github.com/**2911817 https://gist.github.com/2911817 Also this is just a single

Re: ||= is much needed?

2012-06-12 Thread Russell Leggett
On Tue, Jun 12, 2012 at 2:31 PM, Tom Ellis tellis...@gmail.com wrote: I like the sound of ?= too. var a; //later on a ?= 15; It goes with all the other operators that are out there too (!=, =, ==, === etc). +1, useful and intuitive. - Russ Tom On 12 Jun 2012, at 19:04, Brendan

Re: Function length

2012-06-12 Thread Russell Leggett
On Tue, Jun 12, 2012 at 1:06 PM, Brendan Eich bren...@mozilla.org wrote: Russell Leggett wrote: It does bring up something else, though, that I've avoided mentioning so far, which is pattern matching. I haven't mentioned it because there is clearly a strawman http://wiki.ecmascript.org

Re: arrows and a proposed softCall

2012-06-05 Thread Russell Leggett
On Tue, Jun 5, 2012 at 12:36 PM, Brendan Eich bren...@mozilla.com wrote: What I perceive from the JSFixed effort, and from Angus who is good enough to post here: people have a particular concern that fat-arrow is too sweet and it will lure the children into the witch's house: passing fat

Re: arrows and a proposed softCall

2012-06-05 Thread Russell Leggett
On Tue, Jun 5, 2012 at 2:30 PM, Angus Croll anguscr...@gmail.com wrote: Yes the thread needs wrapping up. Maybe I can attempt summarize the dilemma - with a question: Is call/apply just a remedy for non-lexical this assignment? Or is it a powerful feature in it own right. I'm with the

Re: arrows and a proposed softCall

2012-05-31 Thread Russell Leggett
On Thu, May 31, 2012 at 1:32 PM, Andreas Rossberg rossb...@google.comwrote: On 31 May 2012 19:01, Bill Frantz fra...@pwpconsult.com wrote: On 5/31/12 at 2:27, rossb...@google.com (Andreas Rossberg) wrote: A function is free to _document_ it as part of its contract, though.

Re: arrows and a proposed softCall

2012-05-29 Thread Russell Leggett
On Tue, May 29, 2012 at 11:52 PM, John Tamplin j...@google.com wrote: On Tue, May 29, 2012 at 11:50 PM, Yehuda Katz wyc...@gmail.com wrote: I'm not sure if this makes sense, but something about breaking `call` and `apply` doesn't sit right with me. Why should an arrow function be treated

Re: TC39 meeting Wed 5/23/2012

2012-05-28 Thread Russell Leggett
On Mon, May 28, 2012 at 12:34 PM, John J Barton johnjbar...@johnjbarton.com wrote: On May 28, 2012 2:53 AM, T.J. Crowder t...@crowdersoftware.com wrote: On 28 May 2012 06:37, John J Barton johnjbar...@johnjbarton.com wrote: A library writer creates an object in one scope and all of

Re: TC39 meeting Wed 5/23/2012

2012-05-28 Thread Russell Leggett
On Tue, May 29, 2012 at 12:07 AM, John J Barton johnjbar...@johnjbarton.com wrote: On Mon, May 28, 2012 at 10:50 AM, T.J. Crowder t...@crowdersoftware.com wrote: On 28 May 2012 18:46, Russell Leggett russell.legg...@gmail.com wrote: Perhaps this discussion would be aided by a more

const classes for max/min

2012-05-24 Thread Russell Leggett
Waldemar has put a pretty firm line in the sand regarding the need for a higher integrity class construct. While I would love to start by agreeing on max/min as a safety syntax and iterating forward, I appreciate the desire for such a construct and would probably use it myself. It seems to me that

Re: const classes for max/min

2012-05-24 Thread Russell Leggett
be non-extensible upon completion of construction. Nothing could be added or removed. Methods would be non-writable, but data would be. As I indicated, private names can be used to protect against unwanted mutation. - Russ On May 24, 2012, at 21:07 , Russell Leggett wrote: Waldemar has put

Re: const classes for max/min

2012-05-24 Thread Russell Leggett
On Thu, May 24, 2012 at 4:27 PM, Axel Rauschmayer a...@rauschma.de wrote: - One key question: Does a property declaration have to look declarative in order to be used declaratively? You are saying no. I think a more declarative form could be added later, this is not future hostile to that.

Re: const classes for max/min

2012-05-24 Thread Russell Leggett
On Thu, May 24, 2012 at 4:50 PM, Erik Arvidsson erik.arvids...@gmail.comwrote: [snip] The problems with these is that no other dynamic language has these kind of requirements. JS developers get by without them today. If we designed a new language I think they would be nice features to have

  1   2   3   >