From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: Function argument order of evaluation Date: Mon, 11 Feb 2019 15:58:15 +0100 Message-ID: <20190211145815.GA9674@tuxteam.de> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qMm9M+Fa2AknHoGS" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="227749"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 11 16:03:31 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtD7J-000x5t-6U for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Feb 2019 16:03:29 +0100 Original-Received: from localhost ([127.0.0.1]:51414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtD7I-0006Vj-6v for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Feb 2019 10:03:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtD2W-0002xH-Ou for help-gnu-emacs@gnu.org; Mon, 11 Feb 2019 09:58:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtD2P-0005Ra-Ha for help-gnu-emacs@gnu.org; Mon, 11 Feb 2019 09:58:29 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]:54286) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gtD2I-0004u1-TO for help-gnu-emacs@gnu.org; Mon, 11 Feb 2019 09:58:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:Date; bh=3Xnp2HquPn5CmQFkemgianYxWONmnXW708F5qqk+V4E=; b=QdQgft8/fxthqArNTOLJqtGQILFpw7CGmR2YcYPmjcPLQhKq+ZOsIkOO/Uhv4UrzsQ3gQE53VZIfzNkOzMaNZI5I4xTIxBB8yHJbuaB84oyyiPp3f2leTcAranfSirETe17dpsfNooYgKlKmYCbFOEaY5aaA/v8PqkgXktDiIsEpuKN48kzrpWQlWGowrMZtrGe5uY1WZY/fU1bruCf6R02oajjF10+BZcSvP9Lt7+2/XvafLQEzx5oYoRULABM67iFIXUEKzD1vOlcjWXflWW3PQKCCyh9XXQRPy/dzkxUhsbuWK0GqlB5mpoAPntYZ6+GbswscxFnRMNfEyc0Mwg==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1gtD2F-0002bu-KQ for help-gnu-emacs@gnu.org; Mon, 11 Feb 2019 15:58:15 +0100 Content-Disposition: inline In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:119343 Archived-At: --qMm9M+Fa2AknHoGS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 11, 2019 at 10:53:06AM +0100, Tadeus Prastowo wrote: > Hello, [about C's funcall arguments evaluation order] > Does Emacs Lisp behave the same or does it provide a guarantee that > the function arguments are always evaluated from left to right? It's left-to-right. From the Elisp manual, "10.2.5 Evaluation of Function Forms": "If the first element of a list being evaluated is a Lisp function object, byte-code object or primitive function object [...] The first step in evaluating a function call is to evaluate the remaining elements of the list from left to right." This seems to be consensus in most of the (traditional) Lisps. Scheme departed from that, specifying unspecified evaluation order, which created some stir at the time in comp.lang.scheme. There were (are?) Schemes which evaluate the arguments left-to-right. Cheers -- tom=C3=A1s --qMm9M+Fa2AknHoGS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlxhjYcACgkQBcgs9XrR2kaM0QCaAy1keojsPgzhTtsjLDctKsSn 0BoAmwS7zCSHwOCYwJpotoZ8ctSykspX =6DGC -----END PGP SIGNATURE----- --qMm9M+Fa2AknHoGS--