home *** CD-ROM | disk | FTP | other *** search
- Path: columba.udac.uu.se!sabik!m93kma
- From: m93kma@sabik.tdb.uu.se (Kristofer Maad)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Namespaces What are they?
- Date: 7 Mar 1996 10:04:46 GMT
- Organization: Uppsala University
- Message-ID: <4hmcbu$1fia@columba.udac.uu.se>
- References: <313523d8@aobh.xs4all.nl>
- NNTP-Posting-Host: sabik.tdb.uu.se
- X-Newsreader: TIN [version 1.2 PL2]
-
- Patrick van Beem (patrick@aobh.xs4all.nl) wrote:
-
- : In a msg of 12 Feb 96 Timothy Eves wrote to All:
-
- : TE> Whilst looking through the Autodocs (OS v40) for the utility.library
- : TE> I've come across several refernces to some software constructs called
- : TE> Namespaces. What are they and what can the be used for?
-
- : The namespace refers to the parts of a variable-name, used to make in
- : unique within a program. The intention is to keep names as short as
- : possible, without loosing the meaning. Things like routine-names etc. don't
- : belong to variables and are a waist of 'namespace' (this waist is called
- : 'namespace-polution'. For example
-
- Well... I think that this is only half correct. According to what I've
- heard, a namespace is an environment in which you can "store" named
- objects. To define this mathematically, a namespace is a set of
- ordered pairs <n, o> where n is a name and o is an object.
-
- In each namespace, all the objects must have unique names. But if you
- have two different namespaces, they can of course have two different
- (or equal) objects of the same name. The added information of which
- namespace is refferred is used to make the reference unambiguous.
-
- For a concrete example, consider that you can have an AmigaDOS command
- called 'list' at the same time as there can be a running process in
- memory called 'list', or a variable in your sourcecode called
- 'list'. You can also have several files named 'list' in different
- directories - different directories are different namespaces.
-
- /Kristofer
-
- --
- Name: Kristofer Maad | "The satisfaction in making a 'crash-
- Snail: Stureg. 12A, 3tr. | proof' system screw up completely
- 753 14 Uppsala | almost makes it worthwhile." /Kris
- Phone: 018-51 11 44 |
- E-Mail: m93kma@student.tdb.uu.se | <http://www.update.uu.se/~kris/>
-