From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Elias_M=C3=A5rtenson?= Newsgroups: gmane.emacs.devel Subject: Re: Why is there no `until' in elisp? Date: Wed, 17 Oct 2018 20:41:26 +0800 Message-ID: References: <87murdu6to.fsf@portable.galex-713.eu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e5d8dc05786bfda2" X-Trace: blaine.gmane.org 1539781042 2820 195.159.176.226 (17 Oct 2018 12:57:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 17 Oct 2018 12:57:22 +0000 (UTC) Cc: Stefan Monnier , emacs-devel To: Yuri Khan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 17 14:57:17 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 1gClO1-0000cR-4t for ged-emacs-devel@m.gmane.org; Wed, 17 Oct 2018 14:57:17 +0200 Original-Received: from localhost ([::1]:36507 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gClQ7-0004wj-F3 for ged-emacs-devel@m.gmane.org; Wed, 17 Oct 2018 08:59:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCl8z-0007O8-Pf for emacs-devel@gnu.org; Wed, 17 Oct 2018 08:41:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCl8v-0003Bd-De for emacs-devel@gnu.org; Wed, 17 Oct 2018 08:41:42 -0400 Original-Received: from mail-it1-x134.google.com ([2607:f8b0:4864:20::134]:55685) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gCl8v-0003AF-3X for emacs-devel@gnu.org; Wed, 17 Oct 2018 08:41:41 -0400 Original-Received: by mail-it1-x134.google.com with SMTP id c23-v6so2080135itd.5 for ; Wed, 17 Oct 2018 05:41:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uR9gAXcHUKFNMESNfLfP4ldLkKDT6KswkBy8YUYX3tc=; b=vfinx4r6jal7pH51AVccec4ub6awEpgt1/kcv7Kv/wAdAANzT22MeYUG8hebKnj6PP v7bPsqKReXRtcCycyc3iJUGjtycIyVnQ2i8v9pg1/CeTgNYnpNGeDaVpeXPyMJdMMmAS xw/5xfQVRB7rP02EmI2m7HjbcQqUgAJdZg39ul1MGagaLOQ9CuVmAmoj8jpQYAoZO8By Za0hqK+MwngkNC9tpiLd/n+sLqwNJrTa87Xme9jaEqhC9EqwTFVfH01brloGTtFx14rn fJyLC3fz8UFvO4RNEmEe+uiwN5dU5MRJ5Q0JD8V3yHFbNa+W5JU0o69lYlWsSolji0mz GKKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uR9gAXcHUKFNMESNfLfP4ldLkKDT6KswkBy8YUYX3tc=; b=mWsrghvKYPbxoIPy9n664irIb/93dcZwXfVrYn4suY9r1lYvxXKTmxI+weGePQrRN8 p6ahE3VuQPDo9L9oPxOwfDsoJnLkjgrndnduwVP/YakxFEqZa+V8ur2xde7pZvJLMdMG mqQwn9TGzvfG6UTs9Q/w6uTl1jDQrW89n2G0ec1ZF7qQi2KMY94JCdLeGoderD14Tsf5 nzJB1Z6U0I+5EZuubebiEpJJhwrWpf4zeY1E3VT5YvJDeF3trW+ODe+vvrhVUzJGBN2p hFOJxUzGojU0AjH01y6z7svzunmV38kHyazkqvQj6ZR+FxGDHd5sgsWyVqi+8o8rO4mh oOGg== X-Gm-Message-State: ABuFfohjslc2pgPs1ZyQT/QjWRl2SNBdm+iNBAZo5/CszwuwLU7XG4gJ kxSKAaeNHneySoPKcJuXQvovnC6/y3yX7YNEHsU= X-Google-Smtp-Source: ACcGV61jF3O+9YVnOnLNNOWlwasCRJjSIrRzn6YbJDYYV3tRx55OKGc5qqiQzCFzcciHzkkhIFbki9M8GqdmIwA5PrI= X-Received: by 2002:a24:c202:: with SMTP id i2-v6mr1674855itg.54.1539780100083; Wed, 17 Oct 2018 05:41:40 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::134 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:230444 Archived-At: --000000000000e5d8dc05786bfda2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 17 Oct 2018, 16:06 Yuri Khan, wrote: In both these implementations, =E2=80=98until=E2=80=99 is still a pre-condi= tion loop > (same as =E2=80=98while=E2=80=99, but with the condition negated). > > However, in many languages that have an =E2=80=98until=E2=80=99 loop as a= language > construct, it is a post-condition loop. The body is executed first, > then the condition is evaluated. > Elisp already has the loop macro from CL which implements all of this, and more. I honestly don't understand what this discussion is all about. Since the desired functionality is already available, why try to define a new API that won't do as much? Regards, Elias > --000000000000e5d8dc05786bfda2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, = 17 Oct 2018, 16:06 Yuri Khan, <yu= rivkhan@gmail.com> wrote:

In both these implementations, =E2=80=98until=E2=80=99 is still a pre-condi= tion loop
(same as =E2=80=98while=E2=80=99, but with the condition negated).

However, in many languages that have an =E2=80=98until=E2=80=99 loop as a l= anguage
construct, it is a post-condition loop. The body is executed first,
then the condition is evaluated.

Elisp already has the loop macro from CL wh= ich implements all of this, and more. I honestly don't understand what = this discussion is all about.=C2=A0

Since the desired functionality is already available, why try t= o define a new API that won't do as much?=C2=A0
=
Regards,=C2=A0
Elias=C2= =A0
--000000000000e5d8dc05786bfda2--