Cyril Auburtin (2016-11-05T10:15:49.000Z)
cyril.auburtin at gmail.com (2016-11-05T10:22:50.530Z)
Do expressions seems like another thing like `=> ({ })` to fix the mess with curly braces (used for expressions or objects litterals) ```js var f = x => ({ foo: 1}); // need () there, but we get used to it. var f = { x: {foo: 1} }; // no need for () ``` But do expressions seems the less bad way (= would be confusing), to solve things like format1 below ```js format1({ html() { // unecessary function to wrap expressions doSomething(...); res.send('..') }, json() { //... }, }) format2({ html: (()=>{ // bit ugly with iifes doSomething(...); res.send('..') })() }) format2({ html: do { // do expressions proposal doSomething(...); res.send('..') } }) format2({ // if you have just one statement, is it stricly equivalent to do { res.send('...') } ? html: res.send('..') }) ``` 2016-11-01 16:46 GMT+01:00 Isiah Meadows <isiahmeadows at gmail.com>:
cyril.auburtin at gmail.com (2016-11-05T10:22:05.286Z)
Do expressions seems like another thing like `=> ({ })` to fix the mess with curly braces (used for expressions or objects litterals) ```js var f = x => ({ foo: 1}); // need () there, but we get used to it. var f = { x: {foo: 1} }; // no need for () ``` But do expressions seems the less bad way (= would be confusing), to solve things like format1 below ```js format1({ html() { // unecessary function to wrap expressions doSomething(...); res.send('..') }, json() { //... }, }) format2({ html: (()=>{ // bit ugly with iifes doSomething(...); res.send('..') })() }) format2({ html: do { // do expressions proposal doSomething(...); res.send('..') } }) format2({ // if you have just one statement, is it stricly equivalent to do { res.send('...') } ? html: res.send('..') }) ``` 2016-11-01 16:46 GMT+01:00 Isiah Meadows <isiahmeadows at gmail.com>:
cyril.auburtin at gmail.com (2016-11-05T10:21:41.928Z)
Do expressions seems like another thing like `=> ({ })` to fix the mess with curly braces (used for expressions or objects litterals) ```js var f = x => ({ foo: 1}); // need () there, but we get used to it. var f = { x: {foo: 1} }; // no need for () ``` But do expressions seems the less bad way (= would be confusing), to solve things like format1 below ```js format1({ html() { // unecessary function to wrap expressions doSomething(...); res.send('..') }, json() { //... }, }) format2({ html: (()=>{ // bit ugly with iifes doSomething(...); res.send('..') })() }) format2({ html: do { // do expressions proposal doSomething(...); res.send('..') } }) format2({ // if you have just one statement, is it stricly equivalent to do { res.send('...') } ? html: res.send('..') }) ``` 2016-11-01 16:46 GMT+01:00 Isiah Meadows <isiahmeadows at gmail.com>: