Re: Close review of Language Overview whitepaper

2007-11-15 Thread liorean
On 14/11/2007, Maciej Stachowiak <[EMAIL PROTECTED]> wrote: > Section III. > > Syntax: The new non-contextual keywords, and the resulting need to > specify dialect out of band, are a problem. I'll have more to say > about compatibility under separate cover. The model with version and e4x arguments

Dylan 'nullable' types [Was: Close review of Language Overview whitepaper]

2007-11-15 Thread P T Withington
On 2007-11-14, at 19:22 EST, Graydon Hoare wrote: > (As far as I can tell -- not being a dylan hacker -- dylan doesn't > even > go as far as having a global sentinel type like nil) The Dylan equivalent of a nullable type is a union of your type with a singleton that acts as the sentinel. Mos

Re: Close review of Language Overview whitepaper

2007-11-15 Thread Brendan Eich
On Nov 14, 2007, at 11:56 PM, Brendan Eich wrote: > Modula 3 had branding for making nominal types from structural > types, but going the other way, "unbranding" a nominal type to get > a structural type, has no precedent I know of, Shaver pointed to generic metaprogramming using C++ template

Re: Dylan 'nullable' types [Was: Close review of Language Overview whitepaper]

2007-11-15 Thread Graydon Hoare
P T Withington wrote: > I must say, coming from Dylan, es3's undefined _and_ null seem like > overkill... but we're stuck with them now! I think they feel like overkill to everyone, but yeah. Backward compatibility! -Graydon ___ Es4-discuss mailing

singleton type constructor?

2007-11-15 Thread P T Withington
I asked this in a bug comment, but it is more appropriate here. Dylan has a singleton type constructor so that you can make a type out of an instance. This is an alternate way of expressing the `eql` specializers of CLOS generic functions. Should es4 have a singleton type constructor? Ex:

Re: Close review of Language Overview whitepaper

2007-11-15 Thread Brendan Eich
On Nov 14, 2007, at 5:34 PM, Brendan Eich wrote: > On Nov 14, 2007, at 2:03 PM, Maciej Stachowiak wrote: > >> Conversions: "In addition, any value in the language converts to a >> member of AnyBoolean", but the conversions specified are all to the >> more specific "boolean" type, so perhaps it sho

Re: Close review of Language Overview whitepaper

2007-11-15 Thread Kris Zyp
On Nov 15, 2007 9:58 AM, Brendan Eich <[EMAIL PROTECTED]> wrote: > On Nov 15, 2007, at 9:17 AM, Kris Zyp wrote: > > > +1 from me. One request: When a filter function is provided to > > JSON.parse, I would like the filter to be called with |this| > > defined to be the root object that is being crea

Re: Close review of Language Overview whitepaper

2007-11-15 Thread Brendan Eich
On Nov 15, 2007, at 9:17 AM, Kris Zyp wrote: > +1 from me. One request: When a filter function is provided to > JSON.parse, I would like the filter to be called with |this| > defined to be the root object that is being created by the parsed > JSON text. Having a reference to the created root

Re: Close review of Language Overview whitepaper

2007-11-15 Thread Brendan Eich
On Nov 14, 2007, at 5:34 PM, Brendan Eich wrote: >> Things I didn't see: >> >> What about standardizing the de facto mess. We did talk about this at some point. I'm not sure everyone is aware of this web compatibility constraint, so I'll describe it briefly and incompletely. When I embedded

Re: Close review of Language Overview whitepaper

2007-11-15 Thread Kris Zyp
> > Various interested parties favored something like the json2.js API > already, and I think everyone will rally round it and beat on it, to make > sure it has the right usability and knobs. I'm hopeful. > +1 from me. One request: When a filter function is provided to JSON.parse, I would like t

Re: "like" and "is like"

2007-11-15 Thread Peter Hall
Thanks. A bit more formal than was expecting, but I think it contains what I'm looking for. Peter On Nov 14, 2007 3:36 PM, Brendan Eich <[EMAIL PROTECTED]> wrote: > > On Nov 14, 2007, at 11:40 AM, Peter Hall wrote: > > > After searching through the wiki and ecmascript.org site, I still > > can't

RE: Understanding Generic Functions

2007-11-15 Thread Lars Hansen
> -Original Message- > From: P T Withington [mailto:[EMAIL PROTECTED] On Behalf Of > P T Withington > Sent: 15. november 2007 14:02 > To: Lars Hansen > Cc: John Resig; es4-discuss > Subject: Re: Understanding Generic Functions > > On 2007-11-15, at 02:52 EST, Lars Hansen wrote: > > [...]

Re: Understanding Generic Functions

2007-11-15 Thread P T Withington
On 2007-11-15, at 02:52 EST, Lars Hansen wrote: [...] > Generic functions can be useful for adding type-dispatched > functionality > after the fact without creating facades/wrappers. My view is that generic functions recognize that any function with more than one class parameter can't logica

RE: generic function with structural types questions

2007-11-15 Thread Lars Hansen
It's a spec issue. --lars > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Yuh-Ruey Chen > Sent: 15. november 2007 01:53 > To: Lars T Hansen > Cc: es4-discuss > Subject: Re: generic function with structural types questions > > By "fixed", do you m

RE: Understanding Generic Functions

2007-11-15 Thread Lars Hansen
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of John Resig > Sent: 15. november 2007 02:27 > > Generic functions are used like this: > > generic function a(b); > generic function a(b:int){} > generic function a(b:string){} Yes. > Generics offer a