From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Olivier Dion via General Guile related discussions Newsgroups: gmane.lisp.guile.user Subject: Re: Ideas for making Guile easier to approach Date: Wed, 09 Feb 2022 16:05:40 -0500 Message-ID: <8735krn42j.fsf@laura> References: <87a6f1mtz3.fsf@nonconstructivism.com> <20220208194657.ed7afe59b80eeb9c7ce880f3@gmail.com> <87o83fdeqz.fsf@dustycloud.org> Reply-To: Olivier Dion Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30283"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user@gnu.org To: Christine Lemmer-Webber , Chris Vine Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed Feb 09 22:08:40 2022 Return-path: Envelope-to: guile-user@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 1nHuCd-0007hi-Td for guile-user@m.gmane-mx.org; Wed, 09 Feb 2022 22:08:39 +0100 Original-Received: from localhost ([::1]:47938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHuCd-00036e-1f for guile-user@m.gmane-mx.org; Wed, 09 Feb 2022 16:08:39 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54364) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHuAZ-0000Nq-Uq for guile-user@gnu.org; Wed, 09 Feb 2022 16:06:32 -0500 Original-Received: from smtp.polymtl.ca ([132.207.4.11]:49484) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHuA3-00071q-AW for guile-user@gnu.org; Wed, 09 Feb 2022 16:06:18 -0500 Original-Received: from localhost (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 219L5e9i028983 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 9 Feb 2022 16:05:45 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 219L5e9i028983 In-Reply-To: <87o83fdeqz.fsf@dustycloud.org> X-Poly-FromMTA: (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) at Wed, 9 Feb 2022 21:05:40 +0000 Received-SPF: pass client-ip=132.207.4.11; envelope-from=olivier.dion@polymtl.ca; helo=smtp.polymtl.ca X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:18054 Archived-At: On Wed, 09 Feb 2022, Christine Lemmer-Webber wrote: > Module names > ============ > > ice-9 -> guile > -------------- > I think that ice-9 is a weird namespace for "guile's standard library" > but it's what we have for historical reasons. Still I would have > preferred that namespace simply be "guile", so we have (guile match) and > (guile format) instead of (ice-9 ...). It would be clearer what ice-9 > *is* to have it be called "guile" instead. But maybe it's too late for > that. How much work would it be to do an alias like this? This is so true. (guile) should have be the name of that module. It can be very confusing for newcomers. > Named SRFIs > ----------- > > If it's possible to do such aliases, I'd also say that making sense of > what SRFI module is what is a real mess for me. (srfi srfi-9) doesn't > tell me what that SRFI *is*. However, if we supported "named" versions > of SRFIs, that would help me. Which of these would be easier to read? I too find this very weird. I don't have a cheat sheet for SRFI name mapping on my desk and it's very awkward. Image if python was doing this .. import srfi.srfi-1 import srfi.srfi-26 import srfi.srfi-64 now very much human friendly. > We had: > > (define-module (my-module) > #:use-module (guile match) > #:use-module (guile format) > #:use-module (srfi list-utils) > #:use-module (srfi records) > #:use-module (srfi args-fold) > #:use-module (srfi streams) > #:use-module (srfi tests)) > > Much easier to follow, no? Yes! For the aliases I think something like this could work for now: (define-syntax-rule (alias-module module-name) (let ((mod (current-module))) (module-for-each (lambda (sym var) (module-define! mod sym var)) (module-public-interface (resolve-module (quote module-name)))) (module-export-all! mod) #f)) then in srfi/tests.scm: (define-module (srfi tests)) (alias-module (srfi srfi-64)) Ideally, something like this should be supported instead: (define-module (srfi srfi-64) #:alias (srfi tests)) -- Olivier Dion Polymtl