It’d work but won’t be beautiful. With this proposal, code would be much easier 
to reason about.

Also it breaks encapsulation (logical, semantic and syntactic), stuff should 
live where it belongs. If it “belongs” inside a function, then it should “live” 
inside function body `{ }`

In the same context, notice how we evolved from callbacks to Promises and now 
to async/await shorthands.

```javascript
const res = await fetch('http://example.com')
```

More pretty than

```javascript
fetch('http://example.com')
    .then(res => /* impl */)
```

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to