guile-devel
[Top][All Lists]
Advanced

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

Re: rename from q to queue


From: Ludovic Courtès
Subject: Re: rename from q to queue
Date: Thu, 14 Apr 2016 16:15:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Mathieu Lirzin <address@hidden> skribis:

> One way to not break backward compatibility, would be to move (ice-9 q)
> code in (ice-9 queue) and make (ice-9 q) use it and re-export every
> variable with its old name.

Right.

> Finally we will need a way to give the information that (ice-9 q) module
> is deprectated to the users.  I am not sure what is the best way to
> achieve this.  Maybe with:
>
>   (eval-when (expand load eval)
>     (display "..." (current-warning-port)))
>
> What do others think?

We could do a quick hack to iterate over the exported bindings,
re-export them, and print a message.

However, I think it would be best to have a mechanism in the module
abstraction to /declare/ renames.  That would allow both the compiler
and the run-time support to emit an appropriate warning.

This would require something like adding a special field to ‘module’
records, such that one can write, say:

  (define-module (ice-9 q)
    #:superseded-by (ice-9 queue))

With that in place, it will become much easier to discuss about ice-9
renames, IMO.

Thoughts?

Thanks,
Ludo’.




reply via email to

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