Re: Simple Modules: lazy dependency evaluation

2011-01-27 Thread Wes Garland
On Wed, Jan 26, 2011 at 5:04 PM, Brendan Eich bren...@mozilla.com wrote: CommonJS may do that on the server side, assuming fast enough file i/o. It's not necessarily a good idea even there (Ryan Dahl has talked about this). On the client, it's right out, which is why client-side CommonJS-like

Re: Simple Modules: lazy dependency evaluation

2011-01-27 Thread David Herman
On Jan 27, 2011, at 8:38 AM, Wes Garland wrote: Kris Kowal's query is interesting: is lazy evaluation worth considering for Simple Modules? module M { export var foo = 42; export function bar() { return foo; } alert(hello, world); } In the example above,

promises | Communicating Event-Loop Concurrency and Distribution

2011-01-27 Thread Irakli Gozalishvili
Hi, I was curious to know what is the state of the following proposal: http://wiki.ecmascript.org/doku.php?id=strawman:concurrency I do believe that having ES native promises could provide drastically better alternative for writing async code in comparison to currently popular nested callback

Re: [ES Harmony Proxies] Fundamental trap definition

2011-01-27 Thread David Bruant
Le 27/01/2011 11:20, Tom Van Cutsem a écrit : - Agreed that if we contemplate adding 'proxy' as an argument to getPropertyDescriptor and getPropertyNames, we should add it to all other traps as well. - Agreed that this is the simplest way of allowing a shared handler to get at the proxy it's

Re: Simple Modules: lazy dependency evaluation

2011-01-27 Thread Kris Kowal
On Thu, Jan 27, 2011 at 7:27 AM, David Herman dher...@mozilla.com wrote: We thought for a while about demand-driven evaluation of modules. There are a couple reasons why I believe it would be too problematic. First, we'd really like to make the act of throwing your code into a module as

Re: Simple Modules: lazy dependency evaluation

2011-01-27 Thread David Herman
On the opposite side of the argument, I presume that this means that modules are evaluated when their transitive dependencies are loaded. This would imply that the order in which the modules are delivered, possibly over a network using multiple connections, would determine the execution

Re: Simple Modules: lazy dependency evaluation

2011-01-27 Thread Kris Kowal
On Thu, Jan 27, 2011 at 9:14 AM, David Herman dher...@mozilla.com wrote: …but it is required to evaluate them in their declared order, deterministically. Would you explain how declaration order is inferred from the contents of the unordered of files? It's clear that the order is at least

Re: Simple Modules: lazy dependency evaluation

2011-01-27 Thread David Herman
The easiest way to think about it is to imagine the fully loaded bits of the whole program as if they were just declared inline in one big file. Then the total order is manifest -- it's just the order they appear in the program. The non-deterministic I/O performed by the compiler is just an

Re: [ES Harmony Proxies] Fundamental trap definition

2011-01-27 Thread Brendan Eich
I will let Tom and Mark field this one in full, but Arrays are *not* host objects, they are native objects in ECMA-262 terms. However, Allen has taken the action to reconcile and perhaps unify the spec's internal methods (its Meta-Object Protocol) and Proxies' MOP. This would allow the spec to

Re: promises | Communicating Event-Loop Concurrency and Distribution

2011-01-27 Thread Mark S. Miller
On Thu, Jan 27, 2011 at 8:00 AM, Irakli Gozalishvili rfo...@gmail.comwrote: Hi, I was curious to know what is the state of the following proposal: http://wiki.ecmascript.org/doku.php?id=strawman:concurrency It's on the agenda for the upcoming March meeting. I was planning to do some more

Re: promises | Communicating Event-Loop Concurrency and Distribution

2011-01-27 Thread Kris Zyp
This looks like a case of creating in-language for a library. This was done with json2.js because it was one of the most widely used libraries in existence and similar JSON handlers were used in numerous libraries. The ref_send library and sibling Q style implementations are not anywhere close to