From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Recommend lexical-binding in Coding Conventions Date: Wed, 21 Oct 2020 07:52:10 -0700 (PDT) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26003"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier , Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 21 16:59:31 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 1kVFaM-0006ev-Li for ged-emacs-devel@m.gmane-mx.org; Wed, 21 Oct 2020 16:59:30 +0200 Original-Received: from localhost ([::1]:42606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVFaL-0005WZ-F7 for ged-emacs-devel@m.gmane-mx.org; Wed, 21 Oct 2020 10:59:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVFVK-0004vk-84 for emacs-devel@gnu.org; Wed, 21 Oct 2020 10:54:20 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:53218) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVFVI-0007MO-CV for emacs-devel@gnu.org; Wed, 21 Oct 2020 10:54:17 -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 09LEmrAM021824; Wed, 21 Oct 2020 14:54:14 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=I4lgnJDRG7M9xY6LUFOsB5G7I5I+OTOr49KwrAOA+SM=; b=C6L1gdnnKwDyD09fWgzBZvfzUPoQrD5YxrqntgLjcyuWb2W2BpKqP+X0OkRCoJPTZwww uiTonYcyt9dhGbAfoHXToGjCemf+dguG7FUCHurN3TfVvjKLqWnMAPO37Hc/k2/heZM3 JLiVP28Ig0Qg+TkA5umVNujFJOCR6K7HPR6ywr+Zg/EJXf/k8nYw+z1e2vJS8+MtEVqI sWSyG/lwYdLA9y8A8CkozrMKO6rZ/X8zjF5h27unmPzUqbFpq6qRodkgzqIISgUbu2+8 GU1RNMo8JMklDzz79OwdVuMe2pez1WP9OqXTpAcs4FjWxwXTS7eceIiPk7nzQOD7F4aF SA== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 349jrps2tp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 21 Oct 2020 14:54:13 +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 09LEo59X025528; Wed, 21 Oct 2020 14:52:13 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 348a6ph7pj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Oct 2020 14:52:13 +0000 Original-Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 09LEqBCv012549; Wed, 21 Oct 2020 14:52:11 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5056.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9780 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=999 bulkscore=0 spamscore=0 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010210113 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9780 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 adultscore=0 bulkscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 spamscore=0 suspectscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010210113 Received-SPF: pass client-ip=141.146.126.78; envelope-from=drew.adams@oracle.com; helo=aserp2120.oracle.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/21 10:54:14 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:258229 Archived-At: > There's a minor risk of confusion where this could be taken to mean that > we recommend code should be rewritten not to use any dynamically scoped > variables at all. >=20 > I'm not sure what would be the best wording to avoid this confusion. May= be: >=20 > @item > We recommended to enable @code{lexical-binding} in all new code, and > to convert existing Emacs Lisp code to enable @code{lexical-binding} > if it doesn't already. @xref{Using Lexical Binding}. I think the risk is more than minor, and there is already a fair amount of confusion out there about this. My suggestion is to speak only in terms of the variable, `lexical-binding'. Recommending that people set it to non-nil is, I think, exactly what we want. If they do that then everything is as desired. That doesn't say anything about using lexical or dynamic binding. And it automatically entails making code that uses non-nil DTRT: if you set it to non-nil then you need to make whatever changes are needed for that.