Re: multiple return values... like ruby

2013-01-03 Thread Anton Kovalyov
See here: http://wiki.ecmascript.org/doku.php?id=harmony:destructuring and https://developer.mozilla.org/en-US/docs/JavaScript/New_in_JavaScript/1.7#Destructuring_assignment_%28Merge_into_own_page.2Fsection%29 Anton On 3 January 2013 07:26, anders elo and...@kaerus.com wrote: I'd like to

Re: ES Modules: suggestions for improvement

2012-06-27 Thread Anton Kovalyov
On Wednesday, June 27, 2012 at 10:32 AM, Isaac Schlueter wrote: I don't think that's a real problem. Can you point to in-the-wild bugs caused by this? Maybe it's a failure of imagination on my part. Not sure if it's relevant but based on feedback I receive spotting typoed variables is one

Re: Zed A. Shaw - The Web Will Die When OOP Dies

2012-06-10 Thread Anton Kovalyov
While I enjoyed this presentation (and I emotionally agree with the frustration) it was factually very misleading. Zed made it seem like W3C/TC39 aren't working on any of his suggested improvements at all while what he meant (according to his and Yehuda's Twitter conversation) is that stable

[ANN] JSFixed recommendations document

2012-06-07 Thread Anton Kovalyov
Hi, When Angus first published his blog post some people got the impression that we're trying to either discredit TC39 and its efforts, or to replace it with our own committee. We value TC39 and feel like they are doing a great job and we have absolutely no interest in starting another

Re: arrows and a proposed softCall

2012-06-04 Thread Anton Kovalyov
On Monday, June 4, 2012 at 3:10 PM, Yehuda Katz wrote: It's too late for jQuery to fix the order now. However, in the face of arrows or bound functions, we probably could detect a user intent to use `this` for their own purposes and use that as a signal to change the order. If I read

Re: arrows and a proposed softCall

2012-05-31 Thread Anton Kovalyov
FWIW, I tried very hard to come up with an example but failed. If I understand it correctly fat arrow acts is a helper for `var self = this`. Then it no matter what the underlying method does the following code will simply ignore `this`: var self = this; DOM.each(div, function (el) {

Re: New Object Extension Literal Strawman

2012-05-30 Thread Anton Kovalyov
I have a question. Here (https://gist.github.com/9a6d60e9c15ac4239b3d) I took a piece of existing boilerplate code and rewrote it using the new syntax. However on L18 I have data-disqus-id that cannot be used on a left hand side of assignment. What's a preferred way to deal with this? Move it

Re: New Object Extension Literal Strawman

2012-05-30 Thread Anton Kovalyov
Thanks. I've updated my gist. I personally think that Rick's suggestion works better in this case because it makes the whole tree of properties more visible. But, at this point, it's just a styling issue. Anton On Wednesday, May 30, 2012 at 5:03 PM, Tab Atkins Jr. wrote: On Wed, May 30,

Re: TC39 meeting Wed 5/23/2012

2012-05-29 Thread Anton Kovalyov
FWIW I don't think it's even possible to use JSLint and 'with'. The parser just quits as if it was a syntax error. Anton On Tuesday, May 29, 2012 at 11:40 AM, Brendan Eich wrote: John Tamplin wrote: 2) I had legacy code using with. You probably want to rewrite such code even if

Re: TC39 bashing

2012-05-10 Thread Anton Kovalyov
Hi, Since David Bruant mentioned JSFixed here let me just say that our intent is not to fight with TC39 (that'd be silly) but to cooperate with it. I try hard to keep people from pitchforking; instead I want them to share their pain points. I personally[1] think that TC39 does a pretty good

Re: A few arrow function specification issues

2012-04-23 Thread Anton Kovalyov
My two cents. A little over a year ago, I went over our JavaScript code here at Disqus and made sure that 99% of it is in strict mode. This was definitely a code cleanup aiming at catching variable leaks and other small bugs. -- Anton Kovalyov Sent with Sparrow (http://www.sparrowmailapp.com