Re: ES4 draft: Error classes

2008-03-09 Thread Lars T Hansen
On 3/9/08, Michael Daumling <[EMAIL PROTECTED]> wrote: > I think that adding backtrace information is overkill for the spec. > Collecting this information should be left to a debugging environment. > > What I would suggest is something along the following lines. It should > be made clear that th

Re: ES4 draft: Namespace

2008-03-08 Thread Lars T Hansen
On 3/8/08, zwetan <[EMAIL PROTECTED]> wrote: > do I understand well that E4X will be removed from ES4 ??? It was never in ES4 to begin with. --lars > this is so wrong i can not even believe it... > > try to parse XML in .NET/Java/PHP/whatever... > the ONLY elegant and straightforward way to

Re: RI or written spec?

2008-03-06 Thread Lars T Hansen
The spec is normative. The RI is informative. (It will presumably have to commit to some things that the spec need not commit to, even if its something as relatively trivial as the precise workings of the random number generator.) --lars On 3/6/08, Michael O'Brien <[EMAIL PROTECTED]> wrote: > I

Re: New Operator

2008-03-06 Thread Lars T Hansen
ry floating point. Decimal floating point has more. Maybe the confusion is regarding "rounding to selected precision" vs "rounding to integer". I'm talking about the former. --lars > > > On 2008-03-06, at 09:08 EST, Lars T Hansen wrote: > > > Tucke

Re: New Operator

2008-03-06 Thread Lars T Hansen
Tucker, I detect sarcasm in your reply, but maybe I'm just being paranoid now... R4RS Scheme: "For integers n1 and n2 with n2 not equal to 0, (= n1 (+ (* n2 (quotient n1 n2)) (remainder n1 n2)))" E262-3 (the % operator): "In the remaining cases, where neither an infinity, nor a zero, nor Na

Re: ES4 draft: Vector

2008-03-05 Thread Lars T Hansen
On 3/6/08, Brendan Eich <[EMAIL PROTECTED]> wrote: > > What I have wanted in the past is a variable length vector whose > length I can freeze at some point. Akin to sealing an object > completely against mutation, after mutating it into good shape during > its early lifetime. Sounds like an arg

Re: ES4 draft: Map

2008-02-29 Thread Lars T Hansen
Sorry that this was unclear in the meta message. The helper function is normative in the sense that it defines the functionality, eg in the order of operations on a data structure. But it is not visible, not part of the api, and a real implementation does not reserve the helper namespace. Ditto for

Re: Greedy triple-quoted string literals

2008-02-18 Thread Lars T Hansen
> > > On Feb 18, 2008, at 5:08, "Lars T Hansen" <[EMAIL PROTECTED]> wrote: > > > The correct interpretation is that a triple quoted string starts with > > three quotes of the same kind and ends when the same three quotes are > > seen in sequence provided

Re: Greedy triple-quoted string literals

2008-02-18 Thread Lars T Hansen
The correct interpretation is that a triple quoted string starts with three quotes of the same kind and ends when the same three quotes are seen in sequence provided that the character following the three is not that same quote character. (Whether you want to call that greedy or not depends on whe

Re: proper tail calls

2008-01-24 Thread Lars T Hansen
On 1/24/08, Nathan de Vries <[EMAIL PROTECTED]> wrote: > On Thu, 2008-01-24 at 20:04 +0100, Chris Pine wrote: > > It was agreed that implementations would always be free to implement > > PTC... > > Really? That wasn't the impression I got. My understanding is that if > PTC isn't a requirement, it s

Re: proper tail calls

2008-01-22 Thread Lars T Hansen
On 1/22/08, Steven Johnson <[EMAIL PROTECTED]> wrote: > > On 1/22/08 12:14 PM, "Lars T Hansen" <[EMAIL PROTECTED]> wrote: > > > IMO, the best design is that (a) a call that is syntatically in tail > > position is executed as a tail call when that is pos

Re: proper tail calls

2008-01-22 Thread Lars T Hansen
One issue with requiring the explicit syntax is that the requirement isn't worth anything as a restriction. The compiler will have to figure out whether a phrase could be a tail call to find out if the ditto phrase using explicit syntax is a legal tail call. It is but a short step from that to op

Re: Closures and let blocks

2008-01-03 Thread Lars T Hansen
On Jan 3, 2008 7:01 PM, Brendan Eich <[EMAIL PROTECTED]> wrote: > On Jan 3, 2008, at 9:58 AM, Igor Bukanov wrote: > > > On 03/01/2008, Brendan Eich <[EMAIL PROTECTED]> wrote: > >>> let function f() { }; > >> > >> I missed that if so -- did you see this in the wiki, a trac ticket, > >> or another do

Re: super.apply(this, arguments)

2007-12-20 Thread Lars T Hansen
Wiki rot. The construct method is long since obsolete. The wiki really is wildly out of date in some respects. There is nothing solid to replace it right now, but reading it can cause severe confusion... --lars On Dec 20, 2007 2:57 PM, P T Withington <[EMAIL PROTECTED]> wrote: > Interesting.

Re: Global functions

2007-12-14 Thread Lars T Hansen
Also see http://bugs.ecmascript.org/ticket/158. --lars On Dec 14, 2007 7:42 PM, Brendan Eich <[EMAIL PROTECTED]> wrote: > > > On Dec 13, 2007, at 11:42 PM, Lars T Hansen wrote: > > > I believe "let function" is broken in the RI (it has been in the past). >

Re: Global functions

2007-12-13 Thread Lars T Hansen
I believe "let function" is broken in the RI (it has been in the past). --lars On Dec 14, 2007 4:41 AM, Michael O'Brien <[EMAIL PROTECTED]> wrote: > While this compiles in the RI, it still produces 2 and 2 for the output. > > ie. doesn't seem they are block scoped functions either. > > Michael >

Re: Spec proposal

2007-12-13 Thread Lars T Hansen
vative standard, not by the ES4 spec, which is plenty complicated already. (Also note that TG1 rejected the previous proposal on "use decimal" (meaning "pretend all numbers are decimal") because we did not think it could be made to work reliably. The same argument would go for any o

Re: Spec proposal

2007-12-13 Thread Lars T Hansen
On Dec 13, 2007 5:07 PM, Michael O'Brien <[EMAIL PROTECTED]> wrote: > I understand that the cut off for proposals is long past. But I believe > this is an important issue that will force non-standard implementations > bad. > > Proposal: > > Running ECMAScript on embedded devices is more and mo

Re: Function.prototype.toString spec

2007-12-02 Thread Lars T Hansen
Aware of it. This has been resolved in favor of making the spec say (effectively) "FunctionDeclaration or FunctionExpression". --lars On 12/2/07, Peter Michaux <[EMAIL PROTECTED]> wrote: > ECMA-262 3rd > > == section 15.3.4.2 == > > Function.prototype.toString returns a representation with synta

Re: Type combinations

2007-11-24 Thread Lars T Hansen
On Nov 24, 2007 3:37 PM, Peter Hall <[EMAIL PROTECTED]> wrote: > Is there any way to express an "intersection" type, analogous to a > union type? None at present. I toyed with similar things for a while, being able to subtract types from unions and so on. > I can see there may be fewer use cases

Re: Bringing up the issue of numerical constraints again

2007-11-17 Thread Lars T Hansen
On Nov 17, 2007 11:11 AM, Yuh-Ruey Chen <[EMAIL PROTECTED]> wrote: > Is it not possible to emulate this already with classes? I think you can > use the implicitly-called construct method, e.g. > > class myint { > private var i: int; > function myint(x: int) { >this.i = int; > }

Re: Enforcing return value types

2007-11-12 Thread Lars T Hansen
I'm guessing you're just experiencing the effects of http://bugs.ecmascript.org/ticket/285. The correct behavior is a run-time error in standard mode; compile-time error in strict mode. --lars On Nov 12, 2007 11:38 PM, Nathan de Vries <[EMAIL PROTECTED]> wrote: > Hi everyone, > > What's the exp

Re: Assigning to ReadOnly properties

2007-11-12 Thread Lars T Hansen
On Nov 12, 2007 4:25 PM, Brendan Eich <[EMAIL PROTECTED]> wrote: > On Nov 12, 2007, at 4:01 PM, Mark Miller wrote: > > > To fix delete within this constraint, "delete " in Caja > > either return true or throws. > > At this point, either ES4 slides down the slippery slope a bit and > courts migratio

Re: Pragmas

2007-11-12 Thread Lars T Hansen
Pragmas are invariably lexically scoped. Some pragmas are probably more useful at the top level, "use strict" is among these. One pattern we think might develop is "use strict" at the top level, followed by "use standard" inside some blocks where strict mode gets in the way (if only temporarily

Re: ES3 quasi incompatibilities

2007-11-11 Thread Lars T Hansen
On Nov 11, 2007 6:01 PM, Garrett Smith <[EMAIL PROTECTED]> wrote: > Function findDuplicate is more like "mark duplicates". The side effect > is that it adds a __marker property to each object. As it stands, this > function can not be called more than once. The second call might be > passed a diffe

Re: function types with void return type

2007-11-07 Thread Lars T Hansen
A bug, no doubt. I'll file it (http://bugs.ecmascript.org -- open to all comers). My expectation would be a compile-time error if a void function tries to return a value since it's syntactically detectable, but I don't remember it being discussed in the group. (Obtaining the return value from a

Re: Prototype Object on Classes

2007-10-28 Thread Lars T Hansen
On 10/29/07, Yehuda Katz <[EMAIL PROTECTED]> wrote: > I couldn't quite determine this from the white-paper: > > If I define a class using the new class constructs, and do *not* make it > dynamic, will I still be able to add new properties to the prototype object? Yes. > If so, doesn't that provid

Re: Suggest adopting .NET/Perl regexp named capture syntax

2007-10-24 Thread Lars T Hansen
On 10/24/07, StevenLevithan <[EMAIL PROTECTED]> wrote: > > ECMAScript 4 regular expression extension proposals indicate that the Python > syntax will be used for named capture. Python uses (?P...) for named > capture, (?P=name) for a backreference within the regex, and \g for a > backreference with

ES4 overview paper released

2007-10-22 Thread Lars T Hansen
(Apparently the original post was lost.) I'm pleased to present you with an overview paper describing ES4 ast he language currently stands. TG1 is no longer accepting proposals, we're working on the ES4 reference implementation, and we're expecting the standard to be finished in October 2008. Th

ES4 overview paper released

2007-10-22 Thread Lars T Hansen
I'm pleased to present you with an overview paper describing ES4 as the language currently stands. TG1 is no longer accepting proposals, we're working on the ES4 reference implementation, and we're expecting the standard to be finished in October 2008. The paper is available at http://www.ecmascr

Re: is ES4 getting too bloated?

2007-10-22 Thread Lars T Hansen
Thank you... --lars On 10/22/07, liorean <[EMAIL PROTECTED]> wrote: > On 22/10/2007, Brendan Eich <[EMAIL PROTECTED]> wrote: > > Give the overview at http://www.ecmascript.org/es4/spec/overview.pdf > > a read and let us know what you think. > > > Page 17: "In addition, any value in the language c

Re: instanceof Operator

2007-10-22 Thread Lars T Hansen
On 10/22/07, P T Withington <[EMAIL PROTECTED]> wrote: > IWBNI there were a single test for string-ness. In ES3, you have to > say: > >typeof x == 'string' || (typeof x == 'object && x instanceof String) > > Am I right in thinking that in ES4 you will be able to say: > >x is string > > to

Re: is ES4 getting too bloated?

2007-10-22 Thread Lars T Hansen
On 10/22/07, zwetan <[EMAIL PROTECTED]> wrote: > On 10/22/07, Brendan Eich <[EMAIL PROTECTED]> wrote: > > I know of two industry-scale implementations under way, in addition > > to Mozilla's Tamarin project, and Michael O'Brien (mbedthis.com), all > > implementing ES4 in the next six to nine months

Re: Object.prototype.clone

2007-10-22 Thread Lars T Hansen
With the proviso that the program unit proposal has still to be fully specified and debugged, I believe the following should work: Somewhere: unit Beget { internal package Beget { Object.prototype.beget = function (o) { /* what you expect */ } Object.prototype.propertyIsEnumer

Re: instanceof Operator

2007-10-21 Thread Lars T Hansen
On 10/21/07, Jeff Dyer <[EMAIL PROTECTED]> wrote: > > On 10/21/07 10:03 AM, liorean wrote: > > > On 21/10/2007, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> var a; > >> a= {}; > >> a instanceof Object //true > >> a= []; > >> a instanceof Array //true > >> a='asdf'; > >> a instanceof String //f

Re: 'switch' operator improvement

2007-10-16 Thread Lars T Hansen
Neat, though it breaks backward compatibility -- each regexp is converted to string before the comparison, IIRC. (Compatibility may not be a big problem in practice in this case.) --lars On 10/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > allow RegEx in case > > var str= 'a'; > switc

Re: Type Annotations ?

2007-10-03 Thread Lars T Hansen
The ES4 syntax for type annotations is invariably a postfix ": type" phrase: put it on variable bindings, parameters, functions (following the parameter list). For example, function dot( xs: Vector., ys: Vector.): double { let result: double = 0 for ( let i: uint=0, limit: uint=xs.lengh

Re: String is open and dynamic!

2007-09-27 Thread Lars T Hansen
You can subclass "String" but not "string", and the latter is not a subclass of the former, which is just a container class. So I might not open the Champagne quite yet, if I were you. --lars On 9/27/07, P T Withington <[EMAIL PROTECTED]> wrote: > I was just about to ask if I would be able to su

Re: Proposal: nullable wrapper class for primitive data types (int, Number, Boolean)

2007-09-22 Thread Lars T Hansen
On 9/22/07, David Teller <[EMAIL PROTECTED]> wrote: > On Fri, 2007-09-21 at 17:08 +0200, Lars T Hansen wrote: > > > The ES4 design docs on the wiki do not always explain the current > > state of the language; we're not updating them any more. > > > > (Tenta

Re: Proposal: nullable wrapper class for primitive data types (int, Number, Boolean)

2007-09-21 Thread Lars T Hansen
for me in place of int. Excellent. --lars > Hopefully Adobe will adopt these classes for Flex development. > > Thanks, > -Todd > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of Lars T Hansen > Sent: Friday, September 21, 2

Re: Proposal: nullable wrapper class for primitive data types (int, Number, Boolean)

2007-09-21 Thread Lars T Hansen
Those pages are probably somewhat out of date. At present we have Boolean, Number, and String which are nullable wrapper classes for boolean, double, and string, respectively. Is there a particular reason you would need specific wrappers for int and could not make do with Number? If the recordse

Re: lookup getter for host properties

2007-09-14 Thread Lars T Hansen
On 9/14/07, Hallvord R. M. Steen <[EMAIL PROTECTED]> wrote: > Hi, > while working on Opera 9.5's support for getters and setters, we've > discussed whether it should be possible to lookup a getter/setter for a > native (host) property. For example, something like > > func = Element.__lookupGetter__

Re: Regex: How should backreferences contained in the capturing match they reference to work?

2007-09-14 Thread Lars T Hansen
On 9/14/07, Brendan Eich <[EMAIL PROTECTED]> wrote: > I am not looking to make trouble here, believe me, but I want to > point out two things that could help David's case: > > 1. JS regexps were modeled by me (to lwall's horror ;-) on Perl > regexen. Here's what perl (5.8.8) does: > > $ perl > "aaa

Re: Regex: How should backreferences contained in the capturing match they reference to work?

2007-09-13 Thread Lars T Hansen
On 9/13/07, liorean <[EMAIL PROTECTED]> wrote: > On 13/09/2007, Lars T Hansen <[EMAIL PROTECTED]> wrote: > > The current behavior > > is well-defined; it's not a hardship for anyone; the incompatibilities > > among the engines are probably not a big deal (th

Re: Regex: Named groups/backreferences

2007-09-13 Thread Lars T Hansen
On 9/13/07, liorean <[EMAIL PROTECTED]> wrote: > Hello! > > Got some questions about named groups: > > "Group names must be valid lexical identifiers, and each group name > must be defined only once within a regular expression." > > 1. Is this meant to indicate that regex add their own lexical scop

Re: Regex: How should backreferences contained in the capturing match they reference to work?

2007-09-13 Thread Lars T Hansen
gree with me (and I was careful to not state my opinion there)... > > > > On 9/2/07, liorean <[EMAIL PROTECTED]> wrote: > > > var > > > re=/(a\1)+|b/, > > > a=[], > > > key, > > > aab=re.exec('aab') >

Re: __proto__

2007-09-11 Thread Lars T Hansen
that, but it has been there in the more hazardous > writable form. I just wanted it be actually included in the spec. Or is > there some new functionality in ES4 that will somehow interact with > __proto__ to introduce a security threat? > Kris > - Original Message - > From:

Re: __proto__

2007-09-11 Thread Lars T Hansen
On 9/11/07, liorean <[EMAIL PROTECTED]> wrote: > On 11/09/2007, Lars T Hansen <[EMAIL PROTECTED]> wrote: > > On the one hand, __proto__ is another potential security hole, and it > > prevents implementations from sharing prototype objects among multiple > > docum

Re: __proto__

2007-09-11 Thread Lars T Hansen
On the one hand, __proto__ is another potential security hole, and it prevents implementations from sharing prototype objects among multiple documents -- the link may be read-only but the object isn't. Function B called from function A with object O may hack O.__proto__ and A can do nothing about

Re: some errata in PDF

2007-09-04 Thread Lars T Hansen
On 9/5/07, Garrett Smith <[EMAIL PROTECTED]> wrote: > On 8/26/07, Lars T Hansen <[EMAIL PROTECTED]> wrote: > > On 8/26/07, Garrett Smith <[EMAIL PROTECTED]> wrote: > > > http://developer.mozilla.org/es4/spec/spec.html > > > > > > Bottom of th

Re: Questions on number constraints and conversions

2007-09-03 Thread Lars T Hansen
On 6/5/07, liorean <[EMAIL PROTECTED]> wrote: > Hello! > > After discussion in a thread on ECMAScript binding of the DOM I came > to wonder a bit of what type of type contraints ES4 actually will be > able to have: > > 2. Also, conversions between the types. Is is possible to have a type > constrai

Re: forEach() trouble when an element is removed during execution

2007-09-03 Thread Lars T Hansen
On 6/18/07, Jason Orendorff <[EMAIL PROTECTED]> wrote: > On 6/18/07, Peter Michaux <[EMAIL PROTECTED]> wrote: > > I don't think that fixing this edge case to make a very robust forEach > > would be a bad idea. I think having a very robust forEach (similar to > > the DOM2 iteration over handlers) wo

Re: 9.6.2 - 'this' or 'super' in a static method

2007-09-03 Thread Lars T Hansen
On 8/21/07, P T Withington <[EMAIL PROTECTED]> wrote: > The es3 code is: > > function A () ...; > A.zot = function zot () { ... this ... } > > function B () ...; > B.prototype = new A(); > B.zot = A.zot; > > hence `this` is A in A.zot and B in B.zot. Right... > I was thinking the equivalent es4 w

Re: Question about pattern

2007-09-03 Thread Lars T Hansen
I believe it is restricted to ArrayPattern. --lars On 8/23/07, Eric Suen <[EMAIL PROTECTED]> wrote: > Hi, > > Pattern ::= ArrayPattern > Pattern -> SimplePattern -> LeftHandSideExpression -> ArrayLiteral > > Is it possible ArrayLiteral appear in Pattern, or it must be an > ArrayPattern? Like Expr

Re: some errata in PDF

2007-09-03 Thread Lars T Hansen
On 8/26/07, Garrett Smith <[EMAIL PROTECTED]> wrote: > Back to "caller"... > "caller" is on the prototype in Mozilla. Not sure where it is in IE, > prototype or instance. > > On the instance in WebKit. > > Absent in Opera. Absent in ES3. Absent in ES4. function f() { // I wonder how my caller

Re: some errata in PDF

2007-09-03 Thread Lars T Hansen
On 8/26/07, Garrett Smith <[EMAIL PROTECTED]> wrote: > The > perfectly valid use case of trying to have a private constructor, will > not, unfortunately be accommodated by ES4; Now filed as bug 166 in the Trac. --lars ___ Es4-discuss mailing list Es4-d

Re: JSON Methods?

2007-09-03 Thread Lars T Hansen
On 9/2/07, Garrett Smith <[EMAIL PROTECTED]> wrote: > I was wondering about the new JSON methods: > > Object.prototype.toJSONString > String.prototype.parseJSON > > to me, parseJSON seems like it should not be a String prototype method. > > I'm thinking about other "parse" type of methods, like Dat

Re: Regex: How should backreferences contained in the capturing match they reference to work?

2007-09-03 Thread Lars T Hansen
On 9/2/07, liorean <[EMAIL PROTECTED]> wrote: > > var > re=/(a\1)+|b/, > a=[], > key, > aab=re.exec('aab') > aaab=re.exec('aaab'); > for(key in aab) > a.push('aab["'+key+'"]: '+aab[key]); > for(key in aaab) > a.push('aaab["'+key+

Re: Status of Array extras in ECMA 4

2007-09-01 Thread Lars T Hansen
On 9/1/07, David Golightly <[EMAIL PROTECTED]> wrote: > I'm curious as to the fate of the famous JavaScript 1.6 Array extras > (indexOf, lastIndexOf, forEach, map, filter, every, some) in ECMAScript 4. > As a JavaScript developer, I've come to greatly appreciate the > functional-style flexibility t

Re: some errata in PDF

2007-08-26 Thread Lars T Hansen
On 8/26/07, Lars T Hansen <[EMAIL PROTECTED]> wrote: > On 8/26/07, Garrett Smith <[EMAIL PROTECTED]> wrote: > > http://developer.mozilla.org/es4/spec/spec.html > > > > Bottom of the page. > > > > I found that it was convenient for printing. > > &g

Re: some errata in PDF

2007-08-26 Thread Lars T Hansen
ved from the ActionScript 3 spec, somewhat updated (maybe) but not current in any sense that I'm aware of. Everyone, I'm removing the link to this spec, the confusion of having it there does us no good. --lars > > Garrett > > > On 8/25/07, Lars T Hansen <[EMAIL PROTEC

Re: 9.6.2 - 'this' or 'super' in a static method

2007-08-21 Thread Lars T Hansen
On 8/21/07, P T Withington <[EMAIL PROTECTED]> wrote: > Surveying my code base I found 27 'static function's, 3 of which use > 'this' to refer to the class, and one of which should not be static > (use 'this' to refer to the instance and the programmer erroneously > declared the function static).

Re: Load a File in ES4 Reference Implementation?

2007-08-19 Thread Lars T Hansen
Loading a file interactively: intrinsic::load(filename) --lars On 8/19/07, Garrett Smith <[EMAIL PROTECTED]> wrote: > I am on a Mac. I downloaded from here, did not compile mysef. > http://www.ecmascript.org/license.php?file=es4-pre-release.M0.osx-ppc.tar.gz > > I would like to run the tests a

Re: array slice syntax

2007-08-16 Thread Lars T Hansen
On 8/16/07, Stefan Gössner <[EMAIL PROTECTED]> wrote: > Hello, > here are my first questions after following the list quite a while. > > 1. I really like the array slice syntax [start:end:step] described in > http://developer.mozilla.org/es4/proposals/slice_syntax.html > > The description seems to

Re: Internet Explorer 8 and Other Browsers?

2007-08-03 Thread Lars T Hansen
On 8/3/07, Nicolas Cannasse <[EMAIL PROTECTED]> wrote: > >>> Is Microsoft working with ECMA TG1 ? > >>> > > Should someone invite them? > > I'm not sure they would come :) Microsoft has participated in the TG1 work for a long time already. --lars ___ Es

Re: Question about joined function object of ECMA-262 3rd edition

2007-07-31 Thread Lars T Hansen
On 7/30/07, P T Withington <[EMAIL PROTECTED]> wrote: > So, what the spec meant to say is: If the compiler writer can think > of an optimization that will save time or space and not break the > semantics of Javascript, they are permitted to make that > optimization. :) Joining is more sinister t

Re: toJSONString and other introspections

2007-07-30 Thread Lars T Hansen
On 7/30/07, Kris Zyp <[EMAIL PROTECTED]> wrote: > > The agreement is that default JSON serialization will discard the > > namespace (in the same way it currently discards eg function objects). > > Sounds good, howevere is there any difference in the treatment of open and > closed namespaces in reg

Re: Independent Date and Time objects/ISO Dates

2007-07-30 Thread Lars T Hansen
On 5/23/07, Brendan Eich <[EMAIL PROTECTED]> wrote: > On May 16, 2007, at 10:37 AM, Lars T Hansen wrote: > > > Ah. No, we've not talked about doing that, and you don't get to set a > > bit on the Date object that says "the time does not matter". I &g

Re: Transient property attribute

2007-07-30 Thread Lars T Hansen
On 6/6/07, Kris Zyp <[EMAIL PROTECTED]> wrote: > Would it be possible to add a property attribute "transient"? It would not > need any special treatment, it would serve purely as a marker. Java has this > as a property attribute/field modifier, and it is very helpful for defining > what fields shou

Re: Syntax questions

2007-07-30 Thread Lars T Hansen
On 7/30/07, David Teller <[EMAIL PROTECTED]> wrote: > > Hi, > I'm currently exploring the code, as a preliminary to writing a static > analysis tool. At the moment, I'm stuck in the lexer, where I have two > questions. > > Firstly, embedded comments seem to be forbidden. That is, a block s

Re: toJSONString and other introspections

2007-07-30 Thread Lars T Hansen
On 6/25/07, Kris Zyp <[EMAIL PROTECTED]> wrote: > I was wondering how toJSONString should handle objects with members of > multiple namespaces? > For example: > namespace N1 > obj = {}; > obj.public::a=1 > obj.N1::b=2 > obj.toJSONString() -> ? > Would toJSONString simply not be able to serialize in

Re: Date.parse return type

2007-07-28 Thread Lars T Hansen
7" and "2007-07" would make it fully compatible.) --lars On 7/28/07, Brendan Eich <[EMAIL PROTECTED]> wrote: > > On Jul 28, 2007, at 11:21 AM, Lars T Hansen wrote: > > > > Date.parse("2007-07-28") > SpiderMonkey: > > js> Date.parse("2007

Re: Date.parse return type

2007-07-28 Thread Lars T Hansen
On 7/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On 7/23/07, Brendan Eich <[EMAIL PROTECTED]> wrote: > > On Jul 23, 2007, at 10:23 AM, [EMAIL PROTECTED] wrote: > > > In the public Date/time proposal, the Date.parse static method > > > returns a Date. This is a bit odd, because the current

Re: week number for date/time proposal

2007-07-28 Thread Lars T Hansen
Thanks for the code. If it is true that ISO week numbers are different from US week numbers I'm not sure we want to touch this, it might be better for sites to implement their own as their needs dictate (based on audience etc). The wikipedia hints that there are even more systems in use (search fo

Re: Separating a Hash type from Object

2007-07-25 Thread Lars T Hansen
On 7/25/07, Brad Fults <[EMAIL PROTECTED]> wrote: > On 7/25/07, Brendan Eich <[EMAIL PROTECTED]> wrote: > > I can take maximum blame for advocating Dict over Dictionary, based > > on brevity and the Python type, transliterated appropriately > > (capitalized, I mean ;-). > > > > But Hash is just as

Re: Separating a Hash type from Object

2007-07-25 Thread Lars T Hansen
On 7/25/07, Garrett <[EMAIL PROTECTED]> wrote: > > > Lars T Hansen-2 wrote: > > > > On 7/25/07, Garrett <[EMAIL PROTECTED]> wrote: > >> I see this as two issues. > >> > >> 1) The need for Collections/Data Structures. > >> 2) The

Re: Separating a Hash type from Object

2007-07-25 Thread Lars T Hansen
On 7/25/07, Lars T Hansen <[EMAIL PROTECTED]> wrote: > On 7/25/07, Garrett <[EMAIL PROTECTED]> wrote: > > I see this as two issues. > > > > 1) The need for Collections/Data Structures. > > 2) The desire for shorthand access to these. > > Indeed. We

Re: Separating a Hash type from Object

2007-07-24 Thread Lars T Hansen
{ > return !this.hasOwnProperty( prop ); // This function is not bound at > this point. > } > }; > > fooTwo.get( "hasOwnProperty" ); // function. > fooTwo.hasOwnProperty( "hasOwnProperty" ); // false. > fooTwo[ "hasOwnProperty" ]; // Do w

Re: ISO/JSON date format timezone questions

2007-07-19 Thread Lars T Hansen
On 7/16/07, Lars T Hansen <[EMAIL PROTECTED]> wrote: > On 7/16/07, Lars T Hansen <[EMAIL PROTECTED]> wrote: > > On 7/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I was wondering about two things involving timezones. > > &

Re: ISO/JSON date format timezone questions

2007-07-17 Thread Lars T Hansen
On 7/17/07, John Cowan <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] scripsit: > > > This proposal also states the T in date/time is mandatory, and the > > rest is optionally: > > timestamp ::= date? "T" time? tz? > > > > a bit odd. I'm glad there's a new version. > > In general the T is mandato

Re: ISO/JSON date format timezone questions

2007-07-16 Thread Lars T Hansen
On 7/16/07, Lars T Hansen <[EMAIL PROTECTED]> wrote: > On 7/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > I was wondering about two things involving timezones. > > > > The proposal "Date and time improvements" is defining the >

Re: ISO/JSON date format timezone questions

2007-07-16 Thread Lars T Hansen
On 7/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > I was wondering about two things involving timezones. > > The proposal "Date and time improvements" is defining the > Date.toISO():String method. > > It's unclear to me in what timezone the date should > be serialized in: local timezo

Re: Object.prototype.equals

2007-07-16 Thread Lars T Hansen
On 7/16/07, Garrett <[EMAIL PROTECTED]> wrote: > > > Jason Orendorff wrote: > > > > On 7/13/07, Garrett <[EMAIL PROTECTED]> wrote: > >> For collections, it would be very useful to have a natively-supported > >> equals() method. > > > > ECMAScript 4 has operator overloading. You can just override t

Re: Namespaces in ECMA

2007-07-15 Thread Lars T Hansen
On 7/15/07, Jason Orendorff <[EMAIL PROTECTED]> wrote: > On 7/15/07, Alexandre Bergel <[EMAIL PROTECTED]> wrote: > > The notion of namespace of ECMA 4 is very interesting. I spent some > > time in reading the new javascript description [1]. I try to > > understand whether a "stack of namespace" is

Re: default constructors and implicit super() insertion

2007-06-27 Thread Lars T Hansen
On 6/26/07, Graydon Hoare <[EMAIL PROTECTED]> wrote: > Peter Hall wrote: > > This syntax doesn't seem to add anything either. It's equivalent to > > enforcing that you initialize the properties in the constructor (as > > opposed to doing it in other functions that could be invoked by the > > constr