I'm not sure I find the reduced readability argument compelling on this one. The alternatives suggested (throwaway variables or crowding meaningful parameters with `undefined`) don't get clean scores on that front either, IMO.
Simply eliding a parameter seems like a nice example of terse/expressive syntax. /2-cents On Wed, Oct 30, 2019 at 4:21 PM Cyril Auburtin <[email protected]> wrote: > I proposed it a long time ago > https://esdiscuss.org/topic/ignoring-arguments > > but I agree with Tab Atkins nowadays, it would hurt readability > > On Wed, Oct 30, 2019 at 9:34 AM Naveen Chawla <[email protected]> > wrote: > >> I tend to agree and one thing I like in good code is "glanceability" - >> >> the ability to "glance" and see what's going on. >> >> If I have >> >> doStuff(bar,, foo,, far) >> >> vs >> >> doStuff(bar, foo,, far) >> >> they don't look too different, but really they are. I normally break >> params into separate lines so I wouldn't have this problem, but there's the >> risk overall. >> >> I like that a motivational factor for introducing a language feature is >> "reducing the likelihood of bugs", and in my mind this one seems to very >> slightly increase it >> >> On Tue, 29 Oct 2019 at 18:49, Tab Atkins Jr. <[email protected]> >> wrote: >> >>> On Tue, Oct 29, 2019 at 9:06 AM manuelbarzi <[email protected]> >>> wrote: >>> > ``` >>> > fun('a', 'b',, 'd',, 'f') >>> > ``` >>> >>> While this does technically match up with arrays, I find the the array >>> behavior unreadable and unintuitive (especially with the exception for >>> the final comma), and I'd prefer that syntax quirk not spread to other >>> list-like syntax constructs. >>> >>> Passing `undefined` is simply and easy enough; if it's too long you >>> can shave off three characters by spelling it `void 0`. Or put a `var >>> _;` at the top of your script and use that. >>> >>> ~TJ >>> _______________________________________________ >>> es-discuss mailing list >>> [email protected] >>> https://mail.mozilla.org/listinfo/es-discuss >>> >> _______________________________________________ >> es-discuss mailing list >> [email protected] >> https://mail.mozilla.org/listinfo/es-discuss >> > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss > -- Jeremy Martin 661.312.3853 @jmar777 <https://twitter.com/jmar777> / @j <https://stream.live/j>
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

