Re: update ecmascript.org

2008-08-23 Thread Brendan Eich
Yes, this was something I hoped to get to last week, but didn't. It'll get fixed. /be On Aug 23, 2008, at 8:09 PM, Garrett Smith wrote: > I've noticed that the ecmascript.org home page has some things that > seem outdated, such as "evolutionary programming." It would be great > to see an updat

Re: Thoughts on IEEE P754

2008-08-23 Thread Brendan Eich
On Aug 23, 2008, at 6:49 PM, Brendan Eich wrote: >> Finally, while Decimal seems like it will be useful to knowledgeable >> developers dealing with financial data, it seems likely to confuse >> the >> average developer more than it will help. > > That is unclear. A "use decimal" pragma that does

Re: Es-discuss - several decimal discussions

2008-08-23 Thread Brendan Eich
On Aug 23, 2008, at 11:14 PM, Brendan Eich wrote: > On Aug 23, 2008, at 5:45 PM, [EMAIL PROTECTED] wrote: >> Point well taken. Does Maciej's followup regarding valueOf throwing >> solve the problem? > > It forces would-be Decimal users to call Decimal.add(Decimal.parse(s) > + 3) Er, Decimal.add(D

Re: Es-discuss - several decimal discussions

2008-08-23 Thread Brendan Eich
On Aug 23, 2008, at 8:23 PM, Sam Ruby wrote: The remainder of the quote that was relayed to me was that spec'ing the operators would not be hard. I took it upon myself to refamilarize myself with spider monkey and implement these operators, and despite it being a decade or so since I've done an

Re: Es-discuss - several decimal discussions

2008-08-23 Thread Brendan Eich
On Aug 23, 2008, at 5:45 PM, [EMAIL PROTECTED] wrote: > On Sat, Aug 23, 2008 at 11:30 AM, Sam Ruby <[EMAIL PROTECTED]> > wrote: >> Having Decimal.parse(2) + 3 produce "23" is not what I would call >> "fail >> fast", as that is a term I would typically use for throwing an >> exception or >> t

Re: return when desugaring to closures

2008-08-23 Thread Mark S. Miller
On Sat, Aug 23, 2008 at 8:36 PM, Peter Michaux <[EMAIL PROTECTED]> wrote: > (function (x, y) {...})(a, b) > > would be quite welcome. It is clear people like this pattern and it is > confusing when the formals and actuals are more than a couple and more > than a couple lines apart. As Lars pointed

Re: Attribute defaults for Object.defineProperty

2008-08-23 Thread Garrett Smith
On Sat, Aug 23, 2008 at 8:07 PM, Garrett Smith <[EMAIL PROTECTED]> wrote: >> On Aug 21, 2008, at 9:55 AM, Allen Wirfs-Brock wrote: >> >>> Or arguably "reconfigurable". >>> > On Thu, Aug 21, 2008 at 8:34 AM, Neil Mix <[EMAIL PROTECTED]> wrote: [snip] > The closest I can come to defining "sealed" is

Re: return when desugaring to closures

2008-08-23 Thread Peter Michaux
On Sat, Aug 23, 2008 at 7:15 PM, Brendan Eich <[EMAIL PROTECTED]> wrote: > On Aug 22, 2008, at 4:02 PM, Lex Spoon wrote: >> So is there anything that is really an issue with the proposed >> desugaring? > > Of course. First, it's unnecessary and confusing to have two ways to > write > > (function (

Re: Es-discuss - several decimal discussions

2008-08-23 Thread Sam Ruby
On Sat, Aug 23, 2008 at 10:48 PM, Brendan Eich <[EMAIL PROTECTED]> wrote: > On Aug 23, 2008, at 10:47 AM, Sam Ruby wrote: > >> On Sat, Aug 23, 2008 at 1:12 PM, Mike Shaver >> <[EMAIL PROTECTED]> wrote: >>> On Sat, Aug 23, 2008 at 10:04 AM, Sam Ruby >>> <[EMAIL PROTECTED]> wrote: Decimal implem

Re: Remarks about module import

2008-08-23 Thread Peter Michaux
On Sat, Aug 23, 2008 at 7:16 PM, Kris Kowal <[EMAIL PROTECTED]> wrote: [snip] > /* these are modules by the same author, in the same directory */ > from "./urllib.js" import urlJoin; I don't know if some sugary syntax like above will be used (or the destructuring syntax will win) but if it is th

update ecmascript.org

2008-08-23 Thread Garrett Smith
I've noticed that the ecmascript.org home page has some things that seem outdated, such as "evolutionary programming." It would be great to see an update to point to the ES 3.1 and Harmony Drafts (in HTML would be great). Thanks, Garrett ___ Es-discuss

Re: Attribute defaults for Object.defineProperty

2008-08-23 Thread Garrett Smith
> On Aug 21, 2008, at 9:55 AM, Allen Wirfs-Brock wrote: > >> Or arguably "reconfigurable". >> On Thu, Aug 21, 2008 at 8:34 AM, Neil Mix <[EMAIL PROTECTED]> wrote: > At the risk of beating a dead horse too much, based on the info you > provided it sounds like the "flexible" attribute isn't really an

Re: Es-discuss - several decimal discussions

2008-08-23 Thread Brendan Eich
On Aug 23, 2008, at 1:23 PM, Maciej Stachowiak wrote: > One possible way to achieve "fail fast" in a library only solution > would be to specify that Decimal.prototype.valueOf always throws an > exception. This would make an attempt to add or multiply using the > operator throw, but would still al

Re: Es-discuss - several decimal discussions

2008-08-23 Thread Brendan Eich
On Aug 23, 2008, at 10:47 AM, Sam Ruby wrote: > On Sat, Aug 23, 2008 at 1:12 PM, Mike Shaver > <[EMAIL PROTECTED]> wrote: >> On Sat, Aug 23, 2008 at 10:04 AM, Sam Ruby >> <[EMAIL PROTECTED]> wrote: >>> Decimal implemented as a library would be sufficient for a 3.1 >>> release. >> >> Would it n

Re: Use of redundant var

2008-08-23 Thread Brendan Eich
On Aug 23, 2008, at 8:23 AM, Fergus Cooney wrote: > Another use I have for redeclaring variables is when I want to > reuse the > name but there's a clear separation between the previous use and > the new > use. For example, I might have a variable to amass a bunch of html > snippets > and th

Re: Es-discuss - several decimal discussions

2008-08-23 Thread Brendan Eich
On Aug 23, 2008, at 8:44 AM, [EMAIL PROTECTED] wrote: > On Sat, Aug 23, 2008 at 1:49 AM, Mike Cowlishaw <[EMAIL PROTECTED]> > wrote: >>> Finally, I'd like to take a poll: Other than people working on >>> decimal >>> at IBM and people on the EcmaScript committee, is there anyone on >>> this >

Re: local

2008-08-23 Thread Brendan Eich
On Aug 22, 2008, at 11:10 AM, Jon Zeppieri wrote: So let statements really are different from let declarations in blocks. I didn't know that JS 1.7 already implements different binding semantics for let declarations on one hand and let statements and expressions on the other. That's odd. E

Re: Remarks about module import

2008-08-23 Thread Kris Kowal
Peter, > Can you provide concrete examples (something a few lines longer than a > hello world module) which shows both the module and importer code? /** this module provides a `sink` function which allows the user to cause a DOM element to forward its events to one and only one, det

Re: return when desugaring to closures

2008-08-23 Thread Brendan Eich
On Aug 22, 2008, at 4:02 PM, Lex Spoon wrote: > You raised return, break, continue, and arguments before, and I > addressed those. Where? Your syntax-free suggestion of labels (as in break to label and continue to label) does not address the problems with |this| or arguments. > So is there

Re: Thoughts on IEEE P754

2008-08-23 Thread Brendan Eich
On Aug 23, 2008, at 2:07 AM, Maciej Stachowiak wrote: To my view, Decimal is much less important overall than, say, ByteArray or some other effective way to represent binary data, which is not in ES3.1 and was even rejected from ES4 (at least as then spec'd). Just for the record, ByteArray was

Re: Remarks about module import

2008-08-23 Thread Peter Michaux
On Sat, Aug 23, 2008 at 5:41 PM, Kris Kowal <[EMAIL PROTECTED]> wrote: > On Mon, Aug 18, 2008 at 1:44 PM, <[EMAIL PROTECTED]> wrote: >> Hi folks, >> The module system proposals, especially the one here -- >> http://wiki.ecmascript.org/doku.php?id=proposals:modules > > Oh, a module party! Sorry I

Re: Es-discuss - several decimal discussions

2008-08-23 Thread ihab . awad
On Sat, Aug 23, 2008 at 11:30 AM, Sam Ruby <[EMAIL PROTECTED]> wrote: > Having Decimal.parse(2) + 3 produce "23" is not what I would call "fail > fast", as that is a term I would typically use for throwing an exception or > the like. Point well taken. Does Maciej's followup regarding valueOf throw

Re: Remarks about module import

2008-08-23 Thread Kris Kowal
On Mon, Aug 18, 2008 at 1:44 PM, <[EMAIL PROTECTED]> wrote: > Hi folks, > The module system proposals, especially the one here -- > http://wiki.ecmascript.org/doku.php?id=proposals:modules Oh, a module party! Sorry I'm late and thanks to Peter Michaux for alerting me that I was missing out. Ih

Re: Conflicting declarations -- Was: Re: local

2008-08-23 Thread Mark S. Miller
> On Fri, Aug 22, 2008 at 12:40 PM, Waldemar Horwat <[EMAIL PROTECTED]> wrote: >> Brendan Eich wrote: >>> On Aug 22, 2008, at 7:26 AM, Ingvar von Schoultz wrote: While reading up on this, I noticed that you can declare the same name with both let and var in the same scope: v

Re: Remarks about module import

2008-08-23 Thread Peter Michaux
I'm a bit late to this module party... On Tue, Aug 19, 2008 at 1:00 AM, Ingvar von Schoultz <[EMAIL PROTECTED]> wrote: > From the descriptions it looks like this could instead use > a syntax based on destructuring assignment, if es-harmony > will have destructuring: > > var {toggle: t, set:

Re: Attribute defaults for Object.defineProperty

2008-08-23 Thread Brendan Eich
On Aug 22, 2008, at 11:53 AM, David-Sarah Hopwood wrote: > Allen Wirfs-Brock wrote: >> Michael Haufe [mailto:[EMAIL PROTECTED] said: Although I'd prefer to control Deletable separately from Fixed, >> >> Using a single state to control deletability, attribute >> mutability, and >> property t

Re: Es-discuss - several decimal discussions

2008-08-23 Thread Maciej Stachowiak
On Aug 23, 2008, at 11:30 AM, Sam Ruby wrote: > [EMAIL PROTECTED] wrote: >> On Sat, Aug 23, 2008 at 10:04 AM, Sam Ruby <[EMAIL PROTECTED]> >> wrote: >>> Decimal implemented as a library would be sufficient for a 3.1 >>> release. The problem is an interoperable definition for what infix >>> ope

Re: Thoughts on IEEE P754

2008-08-23 Thread Maciej Stachowiak
On Aug 23, 2008, at 6:54 AM, Mike Cowlishaw wrote: >> Maciej Stachowiak <[EMAIL PROTECTED]> wrote: >> >>> Finally, I'd like to take a poll: Other than people working on >>> decimal >>> at IBM and people on the EcmaScript committee, is there anyone on >>> this >>> list who thinks that decimal

Re: Es-discuss - several decimal discussions

2008-08-23 Thread Ingvar von Schoultz
Sam Ruby wrote: > [EMAIL PROTECTED] wrote: >> In other words, the same as the "+" operator given a Number and a >> library provided Employee, Document, PopupWidget, ..., or any other >> user defined type. > > Having Decimal.parse(2) + 3 produce "23" is not what I would call "fail > fast", as that

Re: Es-discuss - several decimal discussions

2008-08-23 Thread Sam Ruby
[EMAIL PROTECTED] wrote: > On Sat, Aug 23, 2008 at 10:04 AM, Sam Ruby <[EMAIL PROTECTED]> wrote: >> Decimal implemented as a library would be sufficient for a 3.1 >> release. The problem is an interoperable definition for what infix >> operators is required for completeness. Taking no other actio

Re: Es-discuss - several decimal discussions

2008-08-23 Thread ihab . awad
On Sat, Aug 23, 2008 at 10:04 AM, Sam Ruby <[EMAIL PROTECTED]> wrote: > Decimal implemented as a library would be sufficient for a 3.1 > release. The problem is an interoperable definition for what infix > operators is required for completeness. Taking no other action, the > default behavior for

Re: Es-discuss - several decimal discussions

2008-08-23 Thread Sam Ruby
On Sat, Aug 23, 2008 at 1:12 PM, Mike Shaver <[EMAIL PROTECTED]> wrote: > On Sat, Aug 23, 2008 at 10:04 AM, Sam Ruby <[EMAIL PROTECTED]> wrote: >> Decimal implemented as a library would be sufficient for a 3.1 >> release. > > Would it not be sufficient forever? It seems like that's the strategy >

Re: Es-discuss - several decimal discussions

2008-08-23 Thread Sam Ruby
On Sat, Aug 23, 2008 at 4:49 AM, Mike Cowlishaw <[EMAIL PROTECTED]> wrote: > > So I think this comes down to 'what to do for Decimal.parse'? There > are two obvious choices: > > * Sam's proposal for Decimal.parse is a perfectly good one: if the >source is a binary floating point Number then u

Re: Es-discuss - several decimal discussions

2008-08-23 Thread Mike Shaver
On Sat, Aug 23, 2008 at 10:04 AM, Sam Ruby <[EMAIL PROTECTED]> wrote: > Decimal implemented as a library would be sufficient for a 3.1 > release. Would it not be sufficient forever? It seems like that's the strategy that Java, Python and C are taking, as far as the Really Important Languages go.

Re: Es-discuss - several decimal discussions

2008-08-23 Thread Sam Ruby
On Sat, Aug 23, 2008 at 11:44 AM, <[EMAIL PROTECTED]> wrote: > On Sat, Aug 23, 2008 at 1:49 AM, Mike Cowlishaw <[EMAIL PROTECTED]> wrote: >>> Finally, I'd like to take a poll: Other than people working on decimal >>> at IBM and people on the EcmaScript committee, is there anyone on this >>> list w

Re: Es-discuss - several decimal discussions

2008-08-23 Thread ihab . awad
On Sat, Aug 23, 2008 at 8:44 AM, <[EMAIL PROTECTED]> wrote: > Decimals in Java are implemented at the library level, as > java.math.BigDecimal. There is no expectation that intrinsic math > operators work on them. Is this approach valid for ES; if not, then > why not? I should add that one approa

Re: Poll re Decimal

2008-08-23 Thread Fergus Cooney
Mark S. Miller wrote: > Finally, I'd like to take a poll: Other than people working on decimal > at IBM and people on the EcmaScript committee, is there anyone on this > list who thinks that decimal adds significant value to EcmaScript? If > so, please speak up. Thanks. I seem to remember mention

Re: Es-discuss - several decimal discussions

2008-08-23 Thread ihab . awad
On Sat, Aug 23, 2008 at 1:49 AM, Mike Cowlishaw <[EMAIL PROTECTED]> wrote: >> Finally, I'd like to take a poll: Other than people working on decimal >> at IBM and people on the EcmaScript committee, is there anyone on this >> list who thinks that decimal adds significant value to EcmaScript? If >>

Re: Use of redundant var

2008-08-23 Thread Fergus Cooney
Jon Zeppieri wrote: > On Sat, Aug 23, 2008 at 9:25 AM, Fergus Cooney <[EMAIL PROTECTED]> > wrote: > >> I'm also in favour of multiple, "redundant" vars. I use them >> semantically and as a discipline. >> >>if (something) >>{ >>var x = 1; >>: : : >>} >>else

Re: return when desugaring to closures

2008-08-23 Thread Ingvar von Schoultz
Felix wrote: > Ingvar von Schoultz wrote: >> ...(but restricted to returned values). Also, my brain wants to >> allow the following, or at least reserve as a future possibility... >> >> var {a: x, b: y+z} = fn(); > > your form confuses me a lot, because it's not clear to me where 'y' and

Re: Use of redundant var

2008-08-23 Thread Jon Zeppieri
On Sat, Aug 23, 2008 at 9:25 AM, Fergus Cooney <[EMAIL PROTECTED]> wrote: > I'm also in favour of multiple, "redundant" vars. I use them semantically > and as a discipline. > >if (something) >{ >var x = 1; >: : : >} >else >{ >var x = 2; >

Re: Conflicting declarations -- Was: Re: local

2008-08-23 Thread Ingvar von Schoultz
Brendan Eich wrote: > This past April at the ES4 WG meeting we decided to make let equate to > var at top level within a function body or program. That's good news. > Another thing we do that's a bit harsh is to call repeated let x; > declarations in the same explicit block an error. This is g

Re: Thoughts on IEEE P754

2008-08-23 Thread Mike Cowlishaw
> Maciej Stachowiak <[EMAIL PROTECTED]> wrote: > > > Finally, I'd like to take a poll: Other than people working on decimal > > at IBM and people on the EcmaScript committee, is there anyone on this > > list who thinks that decimal adds significant value to EcmaScript? If > > so, please speak up. T

Re: local

2008-08-23 Thread Fergus Cooney
Just a minor note. My oops. I had to resend my first message (after changing my subscribed email address) and somehow resending it threw away my smilies. If anyone considered me a bit abrupt at any point, and that abruptness would have been tempered by a smiley, that's where there was one! ;-) .

Re: Use of redundant var

2008-08-23 Thread Fergus Cooney
Ingvar von Schoultz wrote: > For very small and simple projects it's great that JavaScript lets > you sprinkle your declarations all over the code, with redundant > repetitions if you like. Block scope should be available also with > this usage pattern, in my view. Jon Zeppieri wrote: > > I do kno

Re: local

2008-08-23 Thread Fergus Cooney
I'm sorry to be putting in my two cents on the "let" debate after so many posts and people getting tired of it but I hope that my contribution is original and useful. Sam Ruby wrote: > Perl uses "my". Short. Implies scope. It's delightfully short and it does imply scope but, for me at least, I'

Re: Thoughts on IEEE P754

2008-08-23 Thread Breton Slivka
On Sat, Aug 23, 2008 at 7:08 PM, David Jones <[EMAIL PROTECTED]> wrote: > > On 22 Aug 2008, at 22:46, Mark S. Miller wrote: >> >> Finally, I'd like to take a poll: Other than people working on decimal >> at IBM and people on the EcmaScript committee, is there anyone on this >> list who thinks that

Re: Thoughts on IEEE P754

2008-08-23 Thread David Jones
On 22 Aug 2008, at 22:46, Mark S. Miller wrote: > > Finally, I'd like to take a poll: Other than people working on decimal > at IBM and people on the EcmaScript committee, is there anyone on this > list who thinks that decimal adds significant value to EcmaScript? If > so, please speak up. Thanks.

Re: Thoughts on IEEE P754

2008-08-23 Thread Maciej Stachowiak
On Aug 22, 2008, at 2:46 PM, Mark S. Miller wrote: > Finally, I'd like to take a poll: Other than people working on decimal > at IBM and people on the EcmaScript committee, is there anyone on this > list who thinks that decimal adds significant value to EcmaScript? If > so, please speak up. Thank

Re: Es-discuss - several decimal discussions

2008-08-23 Thread Mike Cowlishaw
Some comments in reply to several of the comments and questions from overnight, from various writers... > > At the present time, I am only suggesting that ECMAScript support > > Decimal128, and that there not by *any* implicit conversions to > > Decimal. > > > > Decimal.parse(n) would take n.ToStr