Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: convert a string into a json object, Date: Sat, 02 Apr 2016 17:36:19 +0200 Organization: PointedEars Software (PES) Lines: 33 Message-ID: <1630971.JlSNffjCh4@PointedEars.de> References: <87d1q9qfyr.fsf@bsb.me.uk> <2542125.XVB1Yskezl@PointedEars.de> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: solani.org 1459611380 24325 eJwNydsBADEEBMCWsB6nHBL6LyE3v2Nw9hPq5mprixafQX4KDupM6NWF/Ak9UpdGuLPrbsVQPAvCEPs= (2 Apr 2016 15:36:20 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Sat, 2 Apr 2016 15:36:20 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwNxscBwDAIBLCVOEwx45i2/wiJXtJjsHIxNdHVld4iRG2Ce25a84nk6hR1to1B4UW+aJ8FVGevE94lo78fdgwWJg== Cancel-Lock: sha1:O7MeUxHBIZH5w/teE5+ceM1UJMo= X-NNTP-Posting-Host: eJwFwQcBADAIAzBL3aGAnPH8S1gih4upl8IrI2MTBjvHt7WTrbvCQ/Ql+hXLYarAw0qkBT4U9xDW Xref: csiph.com comp.lang.javascript:30190 Aleksandro wrote: > On 01/04/16 23:07, Thomas 'PointedEars' Lahn wrote: >> Ben Bacarisse wrote: >>> John Harris writes: >>>> The code contained >>>> const result = {}; >>>> and >>>> result[i]= person; >>>> >>>> The constant result is not what I would call a constant. You've >>>> updated it. >>> const makes the binding immutable, the object isn't. >> Neither is the value as it is updated on each iteration. This code >> should break; ECMAScript got it wrong. >> >> Rule of thumb of good programming: Do not write code in a way that is >> harder to understand. > > I don't think we will change our way to code because you don't understand. ^^ You must be referring to yourself and the voices in that troll head of yours. Straw man. I am *obviously* not the only one who thinks that this code is written in a counter-intuitive way, and should therefore be written differently. -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.