From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Garreau\, Alexandre" Newsgroups: gmane.emacs.devel Subject: Why is there no `until' in elisp? Date: Tue, 16 Oct 2018 19:42:11 +0200 Message-ID: <87murdu6to.fsf@portable.galex-713.eu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1539712909 32634 195.159.176.226 (16 Oct 2018 18:01:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 16 Oct 2018 18:01:49 +0000 (UTC) User-Agent: Gnus (5.13), GNU Emacs 25.1.1 (i686-pc-linux-gnu) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 16 20:01:45 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCTf6-0008MT-LN for ged-emacs-devel@m.gmane.org; Tue, 16 Oct 2018 20:01:44 +0200 Original-Received: from localhost ([::1]:59461 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCThD-00085y-20 for ged-emacs-devel@m.gmane.org; Tue, 16 Oct 2018 14:03:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCTMP-0006Kz-PX for emacs-devel@gnu.org; Tue, 16 Oct 2018 13:42:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCTME-0000NX-Sy for emacs-devel@gnu.org; Tue, 16 Oct 2018 13:42:17 -0400 Original-Received: from portable.galex-713.eu ([2a00:5884:8305::1]:41182) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gCTME-0000J6-Eo for emacs-devel@gnu.org; Tue, 16 Oct 2018 13:42:14 -0400 Original-Received: from localhost ([::1] helo=portable.galex-713.eu) by portable.galex-713.eu with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gCTMB-0000ta-Fu for emacs-devel@gnu.org; Tue, 16 Oct 2018 19:42:11 +0200 X-GPG-FINGERPRINT: E109 9988 4197 D7CB B0BC 5C23 8DEB 24BA 867D 3F7F X-Accept-Language: fr, en, it, eo X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:5884:8305::1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:230417 Archived-At: Sometimes I have the strong feeling that the symetric of =E2=80=9Cwhile=E2= =80=9D, =E2=80=9Cuntil=E2=80=9D [0], unlike in many languages such as C, exists in = elisp. That happened to me several times, and usually I bug for about an hour before to realize I do this confusion because it has the symetric of =E2=80=9Cwhen= =E2=80=9D: =E2=80=9Cunless=E2=80=9D, but not the same for =E2=80=9Cwhile=E2=80=9D. However, =E2=80=9Cuntil=E2=80=9D exists, for instance in bash (which has no= =E2=80=9Cunless=E2=80=9D=E2=80=A6 maybe because it has no =E2=80=9Cwhen=E2=80=9D because it has guarded =E2= =80=9Cif=E2=80=9Ds?), and I find it pretty handy for making stuff more readable and avoiding making stuff more complex=E2=80=A6 Is there a particular rational or style reason for not using a such trivial and obvious (both in terms of implementation and understandement) construct? If not so, why isn=E2=80=99t it in elisp, aside of `when' and `unless' in subr.el (if that ought to be the correct file?)? [0] such as: (defmacro until (test &rest body) (declare (indent 1)) `(while (not ,test) ,@body))