From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Panicz Maciej Godek Newsgroups: gmane.lisp.guile.user Subject: Re: use-modules: selecting, which symbols not to load Date: Fri, 28 Dec 2012 01:05:47 +0100 Message-ID: References: <871uebkiat.fsf@zigzag.favinet> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1356653160 6754 80.91.229.3 (28 Dec 2012 00:06:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Dec 2012 00:06:00 +0000 (UTC) Cc: guile-user@gnu.org To: Thien-Thi Nguyen Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Dec 28 01:06:13 2012 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ToNSl-0004Dw-Po for guile-user@m.gmane.org; Fri, 28 Dec 2012 01:06:12 +0100 Original-Received: from localhost ([::1]:50231 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToNSX-0008Sn-9f for guile-user@m.gmane.org; Thu, 27 Dec 2012 19:05:57 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:58769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToNSR-0008Sc-WF for guile-user@gnu.org; Thu, 27 Dec 2012 19:05:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ToNSQ-0006Zr-3I for guile-user@gnu.org; Thu, 27 Dec 2012 19:05:51 -0500 Original-Received: from mail-la0-f48.google.com ([209.85.215.48]:42868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToNSP-0006ZL-42 for guile-user@gnu.org; Thu, 27 Dec 2012 19:05:50 -0500 Original-Received: by mail-la0-f48.google.com with SMTP id ej20so72169lab.7 for ; Thu, 27 Dec 2012 16:05:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=IFy8AcOmWYJNzXKb+2ai1WYBZDdHQMeAm7TLPVMnETc=; b=FcaGJwGDTlRHuBloLFh2o6hQeg5wYa+pCJec7FoD8h9Y9KmOkqVogo0OGGa1/j12QJ b04Y5cYOfFx9pO4h2IQFaNJAXhwOEfYNcJ5ShAZviPoWtXpYBmeF8eR3m9V0oU/KE3hq kVZtrT5aQBoRLqt51uRFQRtc8dYagxaCGibe/tGhW2PZv3rwFidtFtWx6V7ylO0dX6Ks 6ODxWG1eA0bcoV6l1NwfVuDOJQqvGnNIixW4BsQxPwSMA8HNpR3Gnwpic1snNUtHlZ78 ZbpT9ZFtL0eFO41DfCnAcw/KyJd7H70GPg+IbyX7AfmmFBzQIvpuJcFsHekiGiK/IAiF vSAg== Original-Received: by 10.152.124.15 with SMTP id me15mr30056504lab.5.1356653148096; Thu, 27 Dec 2012 16:05:48 -0800 (PST) Original-Received: by 10.112.4.226 with HTTP; Thu, 27 Dec 2012 16:05:47 -0800 (PST) In-Reply-To: <871uebkiat.fsf@zigzag.favinet> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.215.48 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:9811 Archived-At: 2012/12/27 Thien-Thi Nguyen : > () Panicz Maciej Godek > () Thu, 27 Dec 2012 04:43:16 +0100 > > I think it can sometimes be desirable to import the whole public > interface except certain bindings. > > Could you give a non-contrived example? I can't think of any, myself. > I remember toying w/ the idea when adding =91#:renamer=92, w/ same doubts= . I recently had two similar cases, related with similar problem -- namely, with goops' generics. I wanted to use some features (I guess those were bytevector features) from (rnrs) module, but I also imported `write` and `display` procedures, which overrode the `write` and `display` generics from goops. I knew that I wasn't using write nor display from (rnrs) (because I didn't even realize their existence), but I didn't remember which features exactly did I use. Yesterday I had a similar case, because I was trying to make generics from slot-ref and slot-set! so that I could be able to extend their functionality, because I'm trying to extend the goops system to better suit my needs -- so I'd wish, for instance, to be able to record easily, which slots of an object have been modified -- and while I was trying to manage it using macros (and introducing a `define*-class` form with extended syntax), it occurred to me that using generics would be much simpler. > [...] and require me to change my header as the module changes. > > Note that maintaining a blacklist and maintaining a whitelist is still > maintenance. Better to =91#:select=92 exactly what you need and no more, > i.e., take a purely constructive stance. That's maintenance, too, but > the eye work is locally concentrated, which builds Quality, rather than > broadly dispersed, which destroys (or, at best, delays) trust. (IMHO.) I have to say that I completely don't understand this point. I'd never think, that 'precision' is the word that would apply to a module system. For me, the module system should be convenient, rather than 'concentrated'. It's like if -- in a conversation -- you'd need to specify which words you are going to use in which meaning beforehand, before you even say anything meaningful. Such symbols, as +, -, /, *, are available in scheme, even if you're not using any arithmetics in your program. Is it this 'broad dispersion' that you mentioned? I always get frustrated that I have to (use-modules (ice-9 match) (srfi srfi-2)), because I use the 'match' and 'and-let*' syntaxes as a part of the common logic of the language. OK, maybe arithmetics is an exception. But it's really a surprise that such procedures as inet-aton or select are available in the core guile, because I'd rather expect to (use-modules (unix socket)) or something like that, before using them. But I'm used to thinking of modules as if they were (more or less consistent) domains, so I would find it extremely irritating if I had to say explicitly, which notions from that domain I want to use. Thanks for your reply :)