Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Aleksandro Newsgroups: comp.lang.javascript Subject: Re: convert a string into a json object, Date: Sat, 2 Apr 2016 21:01:28 -0300 Organization: A noiseless patient Spider Lines: 34 Message-ID: References: <87d1q9qfyr.fsf@bsb.me.uk> <2542125.XVB1Yskezl@PointedEars.de> <1630971.JlSNffjCh4@PointedEars.de> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 2 Apr 2016 23:58:13 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="7363fa7664fe264696fafdff2cecae6a"; logging-data="2875"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+x07fk7L+w8e+Eg8JOlC+2v2zu0cig+24=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 In-Reply-To: <1630971.JlSNffjCh4@PointedEars.de> Cancel-Lock: sha1:Rr6OH21bF8Tz30e1xO0Ho28hMmE= Xref: csiph.com comp.lang.javascript:30196 On 02/04/16 12:36, Thomas 'PointedEars' Lahn wrote: > 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. Someone else agreeing with you doesn't make you automatically right. Calling a troll someone who doesn't agree with you neither does. By the way, since you ignored my question last time, I ask again: why did you “unplonk” me? ;)