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

Issue: PATHNAME-LOGICAL (version 3)

  10. TRANSLATE-LOGICAL-PATHNAME pathname                        [Function]

    If the coerced argument is a logical pathname, the first matching
    translation (according to PATHNAME-MATCH-P) of the logical pathname
    host is applied, using TRANSLATE-PATHNAME with the reversible argument
    true.  If the result is a logical pathname, this process is repeated.
    Three values are returned:
      1. The physical pathname
      2. The from-wildcard of the translation
      3. The to-wildcard of the translation

If the translation process has to be repeated, which wildcards are
returned as values 2 and 3, the first or the last?  It seems to me that
in order to be useful, this must return the entire sequence of wildcard
pairs that were used.  The description later says:

    they might be
    modified to reflect multiple levels of translation and/or additional

Maybe this is answering my question, but I'm unsure whether a single
pair of wildcards can represent a sequence of translations; I guess the
question is whether wildcard translations form a group, or something
like that (my math theory is a bit rusty).

Also, I expect that there are some translations that simply can't be
represented as wildcard translations.  For instance, Genera translates




which requires at least something as powerful as regular expressions
with variables.  I'm not saying that the portable logical pathname
facility must allow the programmer to implement the above translation;
I'm wondering what Genera will return as values 2 and 3 in the case
where a patch file pathname is given to TRANSLATE-LOGICAL-PATHNAME.

I suppose this can be done using wildcards, since there's no restriction
on how complex an implementation's wildcard facility may be (it could
include variables, for instance).  But current practice is to perform
some complex translations outside the wildcard translation mechanism
(and in Genera, one could define a subclass of FS:LOGICAL-HOST that
incorporates arbitrary translation rules).