Multi-index assignment.

Alex Vincent ajvincent at gmail.com
Mon Dec 4 19:38:33 UTC 2017


>
> ---------- Forwarded message ----------
> From: Jordan Harband <ljharb at gmail.com>
> To: "/#!/JoePea" <joe at trusktr.io>
> Cc: es-discuss <es-discuss at mozilla.org>
> Bcc:
> Date: Mon, 4 Dec 2017 11:28:22 -0800
> Subject: Re: Multi-index assignment.
> Can you elaborate on these situations?
>
> In general, I find that using specific array indexes is most often a code
> smell.
>

Agreed, and depending on the programming language, commas in square
brackets has a different meaning.  Way back when I was a child working with
BASIC (I think), foo[1, 2] meant a two-dimensional array, what we now call
foo[1][2].

It sounds like you are trying to abuse object destructuring here... in a
way that is probably dangerous.
-- 
"The first step in confirming there is a bug in someone else's work is
confirming there are no bugs in your own."
-- Alexander J. Vincent, June 30, 2001
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20171204/bf31ae0d/attachment.html>


More information about the es-discuss mailing list