From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxim Cournoyer Newsgroups: gmane.lisp.guile.devel Subject: Re: The Guile junk drawer and a C plea Date: Sun, 30 Jun 2024 22:55:09 -0400 Message-ID: <87ikxp95yq.fsf@gmail.com> References: <20240629002027.13853-1-richard@freakingpenguin.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4406"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Richard Sent , guile-devel To: "Thompson, David" Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Mon Jul 01 04:55:42 2024 Return-path: Envelope-to: guile-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 1sO7Cg-0000uy-17 for guile-devel@m.gmane-mx.org; Mon, 01 Jul 2024 04:55:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sO7CI-0006z0-Hg; Sun, 30 Jun 2024 22:55:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sO7CG-0006xz-Ps for guile-devel@gnu.org; Sun, 30 Jun 2024 22:55:16 -0400 Original-Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sO7CF-0001wK-8V for guile-devel@gnu.org; Sun, 30 Jun 2024 22:55:16 -0400 Original-Received: by mail-qk1-x731.google.com with SMTP id af79cd13be357-79d5e61704eso154668085a.3 for ; Sun, 30 Jun 2024 19:55:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719802512; x=1720407312; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=XEUUdB+9Tg0tglM7iO2M6Wb/6TmVviVUvuEgr+Lc2kE=; b=Vyg71wqRyaRKz1+qg/lWH93H/pQw3czfOPctLqjgjYBkJoN4EScZxSp5Td74RFpgej TOA+QQCSMWbe8I++WWrAA+cNGKREIp4whdcLu/myIOtM8pFMiG9iVtFFGa6Dh8TjbB0B yeUEPLJIt3oeXYpNlcttl1KgeIHDNDL/tVjCEsNRKRGCwUeq1MYC7Jf3AB/fwHMiZSfC 7m6Hr7v4kePp2+nBPfpzczFOqMrZ/Qg+nhIlHNH4yZTkXYipKcQfkUvZ3nECR0VQyFgd ZjcLZlRq7MnQ67RL+x7REDuUoe4TfPgUjg9D/yHVajHswtsz3XfZ2WczAIos133wSQNM ia1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719802512; x=1720407312; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=XEUUdB+9Tg0tglM7iO2M6Wb/6TmVviVUvuEgr+Lc2kE=; b=lFslzZz2TKg+VBcnnPtaGZka/V4KBW1v897QwTcjkDaZ1hobnjW+wbFt/y5+dBqrnI ft2BQxT8M7lLe3wv+BPjI7AgLbN3rlZ79iSGe0+A0yTlYJ4uUka2olgBXEBRd4MJBXxe aI6h4cS8P8+h57obw8F44RVHvdG/S8ZkXCEvKf9AaNM3wXlvog4NrYYQ0r9ZvUQyFlr9 dviLJJWMvXI+ds7itCU5xfXL4dl0e0BISQOcoOdcCZdEnRixOZuu28kPzbT8mt/YNdGq rpdQf1i+Kp+DogF6Pvd54i6zPrA/lsUap7NyXKZ8LZFpAgkOZZm8UOVZ4Dabzt906UTM RYAg== X-Forwarded-Encrypted: i=1; AJvYcCWvaHM8sZ6TwW9PoHGtDljuA9RYYtGO8bDZbYHaau+cPzlrH0/Ox5mbXDKVskK8g2XsMeGQjtCyCuUn/N/wehUZLFis X-Gm-Message-State: AOJu0YzpuyY8apbPIIJYxaGBoMh6c9JGZB4UdolBDC+uZf5/frV7DrwJ LaGxZZL+s/3QovMmdsFrF2fS+hBuIXN1vwg4zagxYvsGACySDUEOT1vn7Q== X-Google-Smtp-Source: AGHT+IGw868r3hQ5NxrDVwSpU/lDrxIULptRdIat8yXr8WOq+54N0I+PMgcyFQL3TI8FoMxhcVVJZg== X-Received: by 2002:a05:6214:f03:b0:6b5:47b0:8f09 with SMTP id 6a1803df08f44-6b5b70cde0fmr62148996d6.36.1719802511958; Sun, 30 Jun 2024 19:55:11 -0700 (PDT) Original-Received: from hurd ([204.48.95.10]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b59e615b8csm29021236d6.123.2024.06.30.19.55.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jun 2024 19:55:11 -0700 (PDT) In-Reply-To: (David Thompson's message of "Fri, 28 Jun 2024 22:52:46 -0400") Received-SPF: pass client-ip=2607:f8b0:4864:20::731; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x731.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:22526 Archived-At: Hi David, "Thompson, David" writes: > Hi Richard and all other Guilers, too, > > What follows is not code review, but your patch felt like an > opportunity to provide some commentary about the trajectory of Guile > development that I've wanted to share for awhile. > > First, I think Guile's default environment is a total mess. It's the > very definition of a junk drawer. There's over 1000 names in the > (guile) module! Contrast this with R7RS-small's (scheme base) module > that only has 200ish. Guile is an old project and I'm sure stuff just > accumulated over the years, but having so much in the default > environment makes it hard to know what a program actually uses because > many things that ought to be explicit imports are not. This makes it a > challenge to move Guile in a more "least authority" direction. As a > rule, I think Guile should *not* add any additional names to the > default environment without an extremely good reason. Because (guile) > is imported implicitly, new names can cause clashes with existing code > that require #:replace to suppress the warning about shadowing core > bindings. For example, the newish 'spawn' procedure collides with > 'spawn' in (goblins core) in the Goblins project. I think Guile needs > a (multi-year, multi-major version) plan to deprecate cruft and move > the good stuff into different modules. Give a hoot, don't pollute > (the default environment)! You probably know this, but in case you or others don't, you can have a clean, explicit environment by writing a R7RS-small compatible library via 'define-library' in a .sld file. I think that's a good standard and portable way to resolve the messy default environment situation, which we should embrace more. On a related note, I have some patches improving R7RS support in Guile on the tracker/mailing list, such as #71304, which allowed me to import R7RS SRFI implementations as-is. -- Thanks, Maxim