Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.albasani.net!news.teledata-fn.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="ISO-8859-1" Message-ID: <3325601.CWPS83hRNz@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Wed, 01 Feb 2012 21:45:58 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 7Bit Subject: Re: Comparing arraies Newsgroups: comp.lang.javascript References: <8dc6b834-cd20-47a5-a085-f4d5e4402c38@c13g2000yqk.googlegroups.com> <4f218d62$0$6578$9b4e6d93@newsspool3.arcor-online.net> <1934880.aqSPkdTlGX@PointedEars.de> <2259221.FRqVoOGUtd@PointedEars.de> <42ZEMLIaWtIPFwSn@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD> <1634287.nPeGqDzKj4@PointedEars.de> <1946200.aqSPkdTlGX@PointedEars.de> <1660771.jP65nafYdu@PointedEars.de> <7a3a197b-9f8c-45a1-92aa-22a3a5d0b297@t15g2000yqi.googlegroups.com> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 36 NNTP-Posting-Date: 01 Feb 2012 21:45:59 CET NNTP-Posting-Host: fc6c365e.newsspool2.arcor-online.net X-Trace: DXC=lfnQM@1hc\eIkjb;<8iR=aA9EHlD;3Ycb4Fo<]lROoRa8kF On Jan 31, 10:08 am, John G Harris wrote: >> If you want to describe side effects then you have to say that the >> function is from system state to system state. The input state includes >> places to hold the arguments, and places holding anything else that >> affects the result. The output state includes a place to hold the >> result, if any, and places holding the consequences of side effects, >> including the effects of an exception. > > That is one possible method, but neither the 'function' of JavaScript > or any other language you've mentioned do this. To repeat what has > been said earlier: it does not matter what word is used in the > language, 'function' is not a true function in the mathematical sense, > nor can all of the operators of the language. I have to disagree here. That the outcome of a programmatic function, given the same arguments in the same order, is not necessarily the same always, and there may be side-effects, is what distinguishes it from a programmatic operator. With such a programmatic operator, by definition the outcome must be the same given the same operand(s) in the same order (or the operator becomes ambiguous and useless). It is therefore an non-injective *mathematical* function of the operands, from the sets that the operands may belong to, to the set of the result type. But it is _not_ a function in the *syntax* of any programming language, not even C++, because you *need to* tell the two kinds apart to make sense of the syntax, i. e. to parse the program. PointedEars -- realism: HTML 4.01 Strict evangelism: XHTML 1.0 Strict madness: XHTML 1.1 as application/xhtml+xml -- Bjoern Hoehrmann