From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Regexp bytecode disassembler Date: Sat, 21 Mar 2020 16:58:05 -0700 (PDT) Message-ID: References: <4201DF24-BCC4-4C08-9857-38207B7C10B4@acm.org> <83mu8bdriv.fsf@gnu.org> <68FB4EC3-3C67-4D07-8473-5FC671024515@acm.org> <834kuhecsr.fsf@gnu.org> <875zex79bx.fsf@gmail.com> <83y2rtcux2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="55931"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mattiase@acm.org, emacs-devel@gnu.org To: Eli Zaretskii , =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 22 00:58:50 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jFo0w-000ESp-FY for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Mar 2020 00:58:50 +0100 Original-Received: from localhost ([::1]:42000 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFo0v-0007Lv-IN for ged-emacs-devel@m.gmane-mx.org; Sat, 21 Mar 2020 19:58:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40040) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFo0P-0006qV-Bh for emacs-devel@gnu.org; Sat, 21 Mar 2020 19:58:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFo0N-0004sG-Tp for emacs-devel@gnu.org; Sat, 21 Mar 2020 19:58:16 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:39200) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jFo0L-0004r1-UA; Sat, 21 Mar 2020 19:58:14 -0400 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 02LNrWTr043635; Sat, 21 Mar 2020 23:58:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=Iy9R6EfsBdqVDg6SWmi5oUl4Smd5Y1zAyrNwK557wLc=; b=vkXdw9uFKaW4pkaHSDfHZTCI43lebmDyJpeaKbbKWE+D6UPLjnk/2/xvpB4gCgvkNeM7 RRZMHA4ZNWXguhWgY9Qfp2XRzLSstRYQpHXHwfhAFa8nLL6ii9sG3KL/IfpwUthk9qCk IDPHbaHuvOceQv8wMUM/FX3IVJs+2wU25LIp8Qmh2tsUT4A0/r3e4NR9E+YOJsUZQyLi LTyBhmatGUq9b/ekDduhpOCznaJZnSIkNqUJuvZ2cXPZbwg5+NmDti3p7E+y/bTzhGcY gV7Of/jRIASXK7JOpL9phmppNLflVtyU51i9h8lH4idlDqFvXtk6fuvJ5CosC2afgAO3 rQ== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 2ywavksr43-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 21 Mar 2020 23:58:07 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 02LNrxjx078189; Sat, 21 Mar 2020 23:58:07 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 2ywvfn17y2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 21 Mar 2020 23:58:07 +0000 Original-Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 02LNw5o5023516; Sat, 21 Mar 2020 23:58:06 GMT In-Reply-To: <83y2rtcux2.fsf@gnu.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4966.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9567 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 phishscore=0 bulkscore=0 adultscore=0 spamscore=0 suspectscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003210143 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9567 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 malwarescore=0 priorityscore=1501 mlxscore=0 bulkscore=0 clxscore=1015 impostorscore=0 phishscore=0 suspectscore=0 mlxlogscore=999 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003210143 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 141.146.126.78 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245654 Archived-At: > > Do you mean you would prefer to use `cond' and rewrite all those > > clauses to something like the following? > > > > (cond > > ((eql opcode 0) (cons 'no-op 1)) > > ((eql opcode 1) (cons 'succeed 1)) >=20 > Yes. Sorry for butting in, and I haven't followed the thread. But if it were I, I'd just use `case' (aka `cl-case' now), assuming that all of the clauses just test the value of `opcode' using `eql'. `case' automatically uses `eql', and it makes very clear that the _only_ tests are `opcode' values. To me, `pcase' would be overkill here and `cond' would be unnecessarily verbose and wouldn't emphasize what I said in the previous paragraph. (case opcode (0 (cons 'no-op 1)) (1 (cons 'succeed 1)) ...)