Re: file's locator?

From: [at]} <Fyodor>
Date: Tue, 6 Aug 2002 21:41:30 +0400 (MSD)

----boundary-LibPST-iamunique-875472536_-_-
Content-type: text/plain

Actually I was interested in understanding the Blackbox design decisions
to augment the fragments of information from the documentation and to
better understand some decisions in my own programs.

Incidentally, the documentation says: "Module Files provides the
abstractions necessary to handle most aspects of a hierarchical file
system. .. Each file resides at some location in the file hierarchy
..." Et cetera. Clearly, the design of Files is heavily influenced by this
connection with hierarchical file systems.

Also, it is often sufficient to provide access to data via properly
initialized readers/writers passed to the application procedures as
parameters. Then Files.File as a separate data abstraction is simply
superfluous.
One can of course imagine situations where the number of simultaneously
open readers and writers can dynamically grow large; then a File is a
convenient factory object for its riders (although riders could replicate
themselves too).

A related point: a separation of concerns between Stores.Reader/Writer
(which is non-extensible) and Files.Reader/Writer is dictated by the
nature of file read/write operations (reading/writing mostly base
types) and the nature of the data storage in files (all data packed to a
sequence of bytes).
Come to think of it: it is easy to implement a concrete extension of
Files.File/Reader/Writer to work with, say, an array of bytes.
Then, I guess, one could simply connect Stores.Reader to such a
Files.File.
Of course, the notion of Locator is irrelevant here.
Nice.
Thanks for pointing this -- there may be interesting uses for it.

However, if the above assumptions are not valid then the pattern used in
Blackbox may be less adequate (e.g. in my case I need to abstract access
to well-structured data [i.e. one never deals with base types directly]
stored in a list, file, or generated on the fly and accessed in a mostly
sequential fasion).
Although the general pattern Rider/Carrier is still applicable, its
realization is somewhat different with riders a primary abstraction and
most carriers very lightweight.

Anyhow: Files.File is a data, not storage abstraction.
It also turns out that several calls to Files.dir.Old with the same file
name return pointers to the same object.
Nice -- comparison of File objects is then trivial (ought to be in
documentation) -- but the hidden data structure needed to allow this in
alternative implementations may be too
heavyweight in applications where File is something different from an
actual disk file.
 
I guess the same would be true for Locators (have not checked -- ought to
be in documentation also).

Thanks for your attention and best regards,
Fyodor
[2002-08-06]
------------------------------------
From: support{([at]})nowhere.xy
To: <blackbox{([at]})nowhere.xy
Subject: Re: file's locator?
Date: Mon, 5 Aug 2002 18:30:58 +0200

> Please note that files (Files.File) are a data abstraction that is
> independent of the data's location.

----- Original Message -----
From: <ftkachov{([at]})nowhere.xy
To: <blackbox{([at]})nowhere.xy
Cc: "F.V.Tkachov" <ftkachov{([at]})nowhere.xy
Sent: Monday, August 05, 2002 3:52 PM
Subject: file's locator?

> is there a way to obtain from a f:Files.File its locator?
> A file ought to carry information about its location?




--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.


----boundary-LibPST-iamunique-875472536_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIEFjdHVhbGx5IEkgd2FzIGludGVyZXN0ZWQgaW4g
dW5kZXJzdGFuZGluZyB0aGUgQmxhY2tib3ggZGVzaWduIGRlY2lzaW9uc1xwYXINCnRvIGF1Z21l
bnQgdGhlIGZy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