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 point

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 mean an RI

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: 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 see any

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 the

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: 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 should be

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++ templates,

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. Most

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 in