Sam Goto

Results 159 comments of Sam Goto

> This probably has to do with some of the restrictions on the contents of the blocks, which are not > really spelled out (or maybe I skimmed over them...

In the current formulation, every nested block gets called with "this". It is **not** a **with** like resolution: lexically, it tells where to look at things. For example: ``` server...

App is the first argument to the call to server. It is defined earlier.

In the current formulation, ```app``` refers to the ```const app``` above. ```javascript const app = express() server(app) { get("/route") { // This is the express app NOT this.app. Normal identifier...

If this.app is not defined, it is equivalent to let a = undefined; a();. That is, it throws. Ah, good point about nesting DSLs. A couple of options: 1) The...

This thread just made me realize that my current formulation registering DSLs isn't going to work very well. Specifically, some use cases are not DSLs at all, but are control...

Ah, I see now what you mean by ```with```-like concerns (clarifying question: are you concerned about performance or ```with```-like identifier resolution confusion?). This formulation could deal with both cases, but...

FWIW, this approach is consistent with Kotlin: it resolves function identifiers looking at "this" first before looking at the global scope. Here is an example: ```kotlin // This does not...

Originally, I had the following desugaring: ```javascript a { b { } } ``` Would be rewritten as ```javascript a(function() { b.call(this, function() { }) }) ``` Which would avoid...

This wouldn't work in the current formulation, as it is limited to functions (as opposed to methods). Do you think this use case is important enough that you think we...