augusto.borgesm at gmail.com (2017-11-06T19:08:52.030Z)
Using arrow functions it doesn't look so verbose
```js
function requestInput(question) {
return new Promise(function(resolve) {
interface.question(question, function(input) {
resolve(input);
})
})
}
```
can be written as:
```js
const requestInput = question => new Promise((resolve) => {
interface.question(question, resolve);
// You can wrap resolve in a `unary` helper if more than 1 argument is problematic
});
```
I don't see a problem with verbosity hereaugusto.borgesm at gmail.com (2017-11-06T19:08:04.592Z)
Using arrow functions it doesn't look so verbose
```js
function requestInput(question) {
return new Promise(function(resolve) {
interface.question(question, function(input) {
resolve(input);
})
})
}
```
can be written as:
```js
const requestInput = question => new Promise((resolve) => {
interface.question(question, resolve);
// You can wrap resolve in a `unary` helper if more than 1 argument is problematic
});
```
I don't see a problem with verbosityaugusto.borgesm at gmail.com (2017-11-06T19:07:45.877Z)
Using arrow functions it doesn't seems so verbose
```js
function requestInput(question) {
return new Promise(function(resolve) {
interface.question(question, function(input) {
resolve(input);
})
})
}
```
can be written as:
```js
const requestInput = question => new Promise((resolve) => {
interface.question(question, resolve);
// You can wrap resolve in a `unary` helper if more than 1 argument is problematic
});
```
I don't see a problem with verbosityaugusto.borgesm at gmail.com (2017-11-06T19:07:38.164Z)
Using arrow functions it doesn't seems so verbose
```js
function requestInput(question) {
return new Promise(function(resolve) {
interface.question(question, function(input) {
resolve(input);
})
})
}
```
can be written as:
```js
const requestInput = question => new Promise((resolve) => {
interface.question(question, resolve); // You can wrap resolve in a `unary` helper if more than 1 argument is problematic
});
```
I don't see a problem with verbosity
Using arrow functions it doesn't seems so verbose ```js function requestInput(question) { return new Promise(function(resolve) { interface.question(question, function(input) { resolve(input); }) }) } ``` can be written as: ```js const requestInput = question => new Promise((resolve) => { interface.question(question, resolve); // You can wrap resolve in a `unary` helper if more than 1 argument is problematic }); ``` I don't see a problem with verbosity -- Augusto Moura -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20171106/d78a8200/attachment.html>