chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] Regarding the hide declaration, #1376


From: Evan Hanson
Subject: Re: [Chicken-hackers] Regarding the hide declaration, #1376
Date: Mon, 5 Jun 2017 18:09:54 +1200

Hi megane,

On 2017-05-28 16:12, megane wrote:
> I was thinking maybe we could leave the declarations as they are and add
> an explicit counterpart for export. The implementation may be pretty
> easy to do by just updating the module export and what not lists. Maybe
> call the new syntax hide-export.

If I understand correctly, this would effectively be an "unexport" of
sorts, like so:

    (module m1 *
      (import chicken scheme)
      (define (foo) 1)
      (define (bar) 2)
      (unexport foo)) ; or (declare (hide-export ...))
    
    (import m1)
    (print (foo)) ; => 1
    (print (bar)) ; => error, since bar was "unexported"

Is that right? Personally, I'd rather make (declare (hide ...)) simply
do the right thing -- the right thing being the behaviour you originally
expected when filing #1376 -- than add a new type of declaration or
module syntax.

I think this is similar to what Peter has said on that ticket, so a
patch of that sort would be very welcome.

Cheers,

Evan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]