texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] file-exists? name conflict (was: Bad crash)


From: David Allouche
Subject: Re: [Texmacs-dev] file-exists? name conflict (was: Bad crash)
Date: Wed, 7 May 2003 19:25:59 +0200
User-agent: Mutt/1.5.3i

On Wed, May 07, 2003 at 10:10:13AM -0600, Nix N. Nix wrote:
> On Wed, 2003-05-07 at 01:43, David Allouche wrote:
> > Actually, the problem with set! is that you may be setting a variable
> > in the guile module (which is always visible) thus reverting back to
> > the name conflict situation we had before: internal guile functions
> > are using texmacs-file-exists? instead of guile's primitive.
> 
> I understand how this could be bad.  However, could we not change
> texmacs-file-exists? to check for the number of arguments, then call the
> guile version of file-exists? if there is only one.  We are (sort of)
> doing it in the current code, but for a different dialect.  If we moved
> the check into texmacs-file-exists?, we could /always/ overwrite the
> guile version - of course, assuming that once we overwrite it, we can
> still access the guile version (maybe via C++).

This kind of overloading is a ugly and fragile hack... That is okay
with old dialects (where we know what we are dealing with). But we
must avoid it on future versions if at all possible.

> > So the correct fix is probably to load compat.scm with
> >     (exec-file "$TEXMACS_PATH/progs/core/boot" "compat.scm")
> > instead of inherit-modules.
> 
> Got to love it when they change the signature of a function :o)

Anyway, texmacs is going to use url-exists? everywhere starting with
1.0.1.13, so the problem will be gone.

Fix name clashes: use different names.
-- 
                                                            -- ddaa




reply via email to

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