From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Proper namespaces in Elisp Date: Mon, 4 May 2020 17:04:27 +0100 Message-ID: References: <237fe643-c14d-5406-b35d-a30dcd42c5ed@gmail.com> 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="1119"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: =?UTF-8?Q?Cl=C3=A9ment_Pit=2DClaudel?= , nic@ferrier.me.uk Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 04 18:18:28 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 1jVdnX-0000B2-Uu for ged-emacs-devel@m.gmane-mx.org; Mon, 04 May 2020 18:18:27 +0200 Original-Received: from localhost ([::1]:38610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVdnW-0007pR-KR for ged-emacs-devel@m.gmane-mx.org; Mon, 04 May 2020 12:18:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVdaE-0008Jp-1b for emacs-devel@gnu.org; Mon, 04 May 2020 12:04:42 -0400 Original-Received: from mail-il1-x132.google.com ([2607:f8b0:4864:20::132]:45994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVdaC-0007Nm-BB for emacs-devel@gnu.org; Mon, 04 May 2020 12:04:41 -0400 Original-Received: by mail-il1-x132.google.com with SMTP id i16so11741846ils.12 for ; Mon, 04 May 2020 09:04:39 -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:content-transfer-encoding; bh=32WFStJhQSADkOkZJtGHDttR2faI2b9cCkF2tO8xp5o=; b=oeKppa36rYdxJqAKmq1aCtVJTS6tvPtIuWoZdvdmZTcJyvv3shqJUfRF/BVChSrz8u CjdxfH+vVP7BA4U3U5EC/9D9cfsjDgxGxKNvVo+QF1d6ItqduSa5LfdtVJUWW89Q9wH7 dkLL6kGUWNkOZN98UKs8GdGAiwUMqsBLcO6oKhwcS4kH9mh4Q8EkcACjbGgkngPxCOas LyngPQw8zOk0WFL4O/pYMjnGPYeTxjt6hDeL8PBEqES3aJNLhu6j4qonBlUD2gKGck6j Cec1I+Znbqvj8tlujyE0CGk2dg+rQhMk4AzC31kGgqsomo9JYTg3EXv7Zx7iQ9BHzOEV 6rFA== 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:content-transfer-encoding; bh=32WFStJhQSADkOkZJtGHDttR2faI2b9cCkF2tO8xp5o=; b=p+ECKQ0Pva18UFMds5dXnlap4dPckiu9T67LkQ01FZMDw8B9R+PrMpISFPP8M4XblQ vB2Smul7SubtRvfgxMkqXxhg457fa2chRjeUyQKDmf1J9URt8s7blfUQdlDw5VCh6b6V 1GSVAFgk3HTHwPkASKYqLNNdchSnO46cHuvP+3Vc2lnBCYp88HyYHU2iAK7bZMiRMLQt kWhG0d09IdnqPflVPKJDeuVpHg4x6v3ED9DURlwFpxHbAE1KMJiRgWT/RMzfJ4WMg31p OOWaqn1F/Es42ecSQND9J/TKvaW41HtE/SFF3uG7bIjqEzWZL+LqvVrRj9JYly19QBkX yUUw== X-Gm-Message-State: AGi0PuYGIugnhPKzePNeER2m0ZmY7GnheNzN/9mxkXeuOpRXC+jm3W4m BkA0eDRfQrrEXU6cfTPQWG/YCC21TlzMg5zL3jg= X-Google-Smtp-Source: APiQypLOatDJ218sTnxg7k6NmsW8XNEt1AFRywZlhDAS3OhsLVKW6yspPS3MG9/SstP0jHB66/trXLjmuK9Yq183u+w= X-Received: by 2002:a05:6e02:f45:: with SMTP id y5mr16706824ilj.199.1588608279158; Mon, 04 May 2020 09:04:39 -0700 (PDT) In-Reply-To: <237fe643-c14d-5406-b35d-a30dcd42c5ed@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::132; envelope-from=joaotavora@gmail.com; helo=mail-il1-x132.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FROM_EXCESS_BASE64=0.979, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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:248856 Archived-At: On Mon, May 4, 2020 at 4:29 PM Cl=C3=A9ment Pit-Claudel wrote: > > On 04/05/2020 06.52, Jo=C3=A3o T=C3=A1vora wrote: > > An here's the idea: if the compiler uses the lexical-binding file-local= var > > when compiling specific files, or functions inside those files, why can= 't > > it use a local-namespaces var when reading symbols? I think this > > very idea was floated at the time, but I can't find it. > > https://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00738.html mayb= e? I think your proposal is quite close to Nic's Yes it is. Thanks you very much! And his blog post describing the is very good: http://nic.ferrier.me.uk/blog/2013_06/adding-namespaces-to-elisp Can't tell, but it seems the thing fizzled partially because some people wanted other systems. I would also prefer CL packages but if a lower effort thing can solve _some_ problems, and be backward compatible and not slow down compilation, maybe we should give it a shot. Anyway, are there any contemporary objections to Nic's plan, in particular I am interested in knowing if there any any major objections to Nic's reader logic: - given a string X - lookup X in the local obarray - if it exists return the symbol - else - lookup X in the global obarray - if it exists return the symbol - else - add the symbol to the local obarray Jo=C3=A3o