Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!217.73.144.45.MISMATCH!feeder2.ecngs.de!ecngs!feeder.ecngs.de!news.osn.de!diablo2.news.osn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Frobernik Newsgroups: comp.lang.javascript Subject: Re: Difference between findPos("divThis") and findPos(divThis) Date: Fri, 18 Nov 2011 09:33:40 +0000 Lines: 25 Message-ID: <9imn3lF61bU1@mid.individual.net> References: <4775241.ypaU67uLZW@PointedEars.de> <2394720.ArG6xLiZAS@PointedEars.de> <4ec07ef1$0$28711$a8266bb1@newsreader.readnews.com> <4ec11fb1$0$28605$a8266bb1@newsreader.readnews.com> <4ec15e82$0$28617$a8266bb1@newsreader.readnews.com> <9iles3FnvhU1@mid.individual.net> <1550675.qVoOGUtdWV@PointedEars.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net KUrz8npZJJOTEEABXILfcwlBRm0gY8mveaNZGhp19Wec/OU4WA Cancel-Lock: sha1:9+ZZUUzlxKF3WmfQ38b3htvVdpM= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 In-Reply-To: <1550675.qVoOGUtdWV@PointedEars.de> Xref: x330-a1.tempe.blueboxinc.net comp.lang.javascript:8402 On 17/11/2011 22:54, Thomas 'PointedEars' Lahn wrote: > Frobernik wrote: >> function findPos(obj, name, colour, b, c) { >> name = obj.name; >> colour = obj.colour; >> b = 17; >> c = [{s:'monkey', x:'male', a:3}, {s:'elephant',x:'female',a:7}]; >> } >> findPos({name:'df', colour:'green'}) > > (Jorge, is it you?) No its not > We have been over this. We have? > Declaring arguments instead of local variables may be great for code golfing > (140 characters maximum), but it is a Really Bad Idea for all other code. > To begin with, by looking at the code you cannot tell whether you are > modifying an argument or not. Editors and linters which can differentiate > between arguments and local variables could not tell as well. An editor or linters not going to know more about my code than me