[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [OT] Re: import
From: |
Nicola Pero |
Subject: |
Re: [OT] Re: import |
Date: |
Fri, 21 Dec 2001 22:31:47 +0000 (GMT) |
Ok - I think my answer was nor very precise, but I've done my homeworks
now.
> It does not matter. This kind of problem is not handled by any
> compiler/language. What if you defined two classes with the same name
> in different files with different path? Whatever the language, you can
> confuse the compiler with links to the same file. Programming
> languages/compilers don't impose any mapping between objects described
> in the language and files (that would link the language to a given
> file system!). That's why it's usefull to have higher level
> constructs in the language such as packages, modules, classes,
> whatever.
#import in C/ObjC is *not* such a higher level construct.
#import in C/ObjC *is* defined in terms of files, so in term of the
filesystem.
how do you determine if you've loaded the same file already is the problem
- I think it's not easy to implement this efficiently in a portable way
for different filesystems.
said that, I was trying to remember why the compiler people are so angry
with #import, I'm personally pretty uninterested in the #import vs
#include warfare, and if the compiler people recommend to use #include
rather than #import, I'm happy with that - if you want to use #import
instead, I'm happy with that as well.
The only thing is - yes I wouldn't mind some #preprocessor command which
would replace the #ifndef/#define/#endif trinity and declare more cleanly
a `module name' for the file, and the compiler would never load two files
with the same module name, that would be simpler and cleaner than the
#ifndef/#define/#endif trinity (though equivalent).
- Re: "external" frameworks, (continued)
- Re: import, David Golden, 2001/12/21
- [OT] Re: import, Pascal Bourguignon, 2001/12/21
- Re: import, Nicola Pero, 2001/12/21
- [OT] Re: import, Pascal Bourguignon, 2001/12/21
- Re: [OT] Re: import, Stan Shebs, 2001/12/21
- Re: [OT] Re: import, Pascal Bourguignon, 2001/12/21
- Re: [OT] Re: import, Jonathan B. Leffert, 2001/12/21
- Re: [OT] Re: import,
Nicola Pero <=
- Re: [OT] Re: import, Jeff Teunissen, 2001/12/22
- Re: GNUStep: An Apology for Announcing Donation of ProprietarySoftware to the Project, Fred Kiefer, 2001/12/21
- RE: GNUStep: An Apology for Announcing Donation of ProprietarySoftware to the Project, Scott Francis, 2001/12/21
- Re: GNUStep: An Apology for Announcing Donation of ProprietarySoftware to the Project, Philippe C.D. Robert, 2001/12/22
- Re: GNUStep: An Apology for Announcing Donation of ProprietarySoftware to the Project, JW, 2001/12/22
- Re: GNUStep: An Apology for Announcing Donation of ProprietarySoftware to the Project, Jeff Teunissen, 2001/12/22
Re: GNUStep: An Apology for Announcing Donation of Proprietary Software to the Project, Adam Fedor, 2001/12/21
RE: GNUStep: An Apology for Announcing Donation of Proprietary Software to the Project, Scott Francis, 2001/12/21