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: Tue, 5 May 2020 13:50:11 +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="17238"; mail-complaints-to="usenet@ciao.gmane.io" Cc: nic@ferrier.me.uk, =?UTF-8?Q?Cl=C3=A9ment_Pit=2DClaudel?= , emacs-devel , Stefan Monnier , Helmut Eller To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 05 14:51:02 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 1jVx2M-0004OD-3i for ged-emacs-devel@m.gmane-mx.org; Tue, 05 May 2020 14:51:02 +0200 Original-Received: from localhost ([::1]:40960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVx2L-0003BU-5m for ged-emacs-devel@m.gmane-mx.org; Tue, 05 May 2020 08:51:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVx1o-0002bo-8y for emacs-devel@gnu.org; Tue, 05 May 2020 08:50:28 -0400 Original-Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]:35053) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVx1m-0005f0-Np for emacs-devel@gnu.org; Tue, 05 May 2020 08:50:27 -0400 Original-Received: by mail-io1-xd36.google.com with SMTP id y26so606512ioj.2 for ; Tue, 05 May 2020 05:50:25 -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=nRuzEl826Ap6ETQEeZetpIA8de/pPi1k9ln82zqCkj0=; b=ZmugAj9ey79tqn1km/NaBYgBgmRcmL6kqVXquc64fdGwHqpOYtpZysEiZy8LHXT54i S7Vs9l/APN6lFS9uLExRQvuUrdDn4V2J1iZ5sq224yEnx5bhCzALL3o2lEaKx0+2OH9s Lq0FIg6ZsGZlaHZl6IaTtox2n5/VYGultyIGNyrD/Z44s0v7Uq9M+Zl9cyJmRh88cKjb z0nr9dVyx/V2P7xh7Rj4mtsh6W0xgJUj44/eM/pmG+awEEdzlrUZpENn9f2VC2FYH62V 9g7DZ6t8xjVfzdWNKJ5/VKwydPZ9rVQxOeVyIYvop7poXDYKytRM2eczy/0iARuYVEed XuBg== 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=nRuzEl826Ap6ETQEeZetpIA8de/pPi1k9ln82zqCkj0=; b=Y9AghhASXj+DZYbRJRMHcBwbC+9s4lujZDnUlK/YWLV1Cyp5JJ3ooU2M4F0xEerYRO eSEFu5kDNmTqEJQleYmnPYkHQdUWh6tJaWJDRqnLCV6bs4qRQ0TQt5v4FiaKgdV1KWu5 9nms1ZPj+1+mJeqlNM6WjcgG3my/MKPC9eQcgNslTww/u5jtTAGSMQxAXXQaL7RHV3zD xB7Ee6dDMSi+PO0VAVei/I4I0/uN2iVfgdRXTS7SVAv0ABtCPT5g5Pz2caLZDzyaUiV0 B/d3ta0C9xMMb9/zWPnkGrac1wuGPgayEQsaxIOqiU8rqIz4E087NYRvJFP5rpr5yn5U j3fA== X-Gm-Message-State: AGi0PuZACylHcbnHStUH4r+zGjzKjoT2y2TXLlTdo7+V+28KTRSqGIsz VD9dmYWyq/0eqQYtCZSQ1VxPxO0egkwKBIEjOfs= X-Google-Smtp-Source: APiQypJMDRnJUCbEvX3hq3F0jcCGdpM9hi44wxxHiGNluHpw2ML8bX+koBi7HV+VX2X49gBSbzW1ADPhT9gkCPAW/MM= X-Received: by 2002:a6b:6a0b:: with SMTP id x11mr3150422iog.57.1588683024553; Tue, 05 May 2020 05:50:24 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::d36; envelope-from=joaotavora@gmail.com; helo=mail-io1-xd36.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:248973 Archived-At: On Tue, May 5, 2020 at 11:34 AM Andrea Corallo wrote > Here is a first simple implication of namespace at read-time: > > #+SRC_BEGIN lisp > > (make-package :xxx) > (in-package :xxx) > (defun foo () 'aaa) > (export 'foo) > > (make-package :yyy) > (in-package :yyy) > (use-package :xxx) > > (if (not (eq (foo) 'aaa)) > (print "boom")) > > #+END_BEGIN > > This is because foo is not returnig 'aaa' but 'xxx::aaa'. Andrea, this makes no sense. How is that different from Elisp where foo returns 'xxx--aaa and yyy.el checks for 'yyy-aaa? Because _that's_ what that program means, except, because it is written in a properly namespaced Lisp, it does it with fewer chars, is DRY, not WET. Or don't you think packages should be allowed internal symbols at all. Maybe you don't, but that's a question of making a package system with the -- IMO quite ill-advised -- option to auto-exporting everything. It's _not_ an implication of the reader-based approach in any way. Or did you mean you want an auto-exported, self-evaluating, quick-to-type, one-big-namespace qualifier? The keyword package is there for that, as you probably know, and that's what everybody uses. _When_ they want those semantics. So, for me, being able to determine the semantics of my program (also called "programming") with little typing is a very good thing, a very good "implication", it's exactly the power I crave. Jo=C3=A3o