[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: import vs include Re: Porting autogsdoc to OSX
From: |
Richard Frith-Macdonald |
Subject: |
Re: import vs include Re: Porting autogsdoc to OSX |
Date: |
Wed, 27 Feb 2002 11:27:09 +0000 |
On Wednesday, February 27, 2002, at 11:11 AM, Peter Cooper wrote:
Ah ... but we are trying to be compatible, not just use the same API.
As much as possible we want
to avoid having to locate and link additional frameworks to do what on
MacOS is all in one.
Not that there is anything particularly hard about linking in extra
libraries, but why confuse
developers by providing frameworks which have the same API but
different
functionality?
It certainly makes development using, say, Cocoa development docs or
mass-
market books easier if APIs live in similar places ;)
On encouraging portable software, to assist people building
cross-platform
apps, eg GNUstep -> OpenStep or GNUstep -> Cocoa it might be useful to
have
some sort of source audit tool for portability.
I suspect that a 100%-correct tool will be impossible to build, but
something that can flag most compatibility issues during development
might
lead to more portable code being written. After all, not all developers
have access to the different platforms during the critical early
implementation phases.
Very tricky.
GNUstep-base provides three relevant mechanisms -
1. API compatibility ...
The header files take note of the STRICT_MACOS_X preprocessor constant
(and others).
When autogsdoc builds documentation, it uses this information to document
which classes, methods, functions types and constants are in MacOS-X
When you build your software, you can define this constant to remove all
non-MacOS-X
information from the headers - so the compiler will give you an error or
warning message
if you try to do anything non portable.
2. Runtime behavior warnings ...
The NSDebug.h defines NSWarnLog and related macros ... when built with
debug on, this
is used to output warnings when your code does something that may be
non-portable.
3. Runtime behavior options ...
The user default system is used to control compatibility behavior -
defining
GSMacOSXCompatible to YES should get GNUstep to do some things in
MacOS-X ways
rather than OpenStep ways.
Of course, the effectiveness of these mechanisms is only as good as
peoples reporting
where they get things wrong. While the first mechanism is probably
pretty good, the
other two depend on us actually knowing how MacOS-X implemented behavior
differs from
GNUstep. Most times, if we find a difference we 'fix' GNUstep. Other
times (eg when
the MacOS-X behavior looks like a bug or id brain damaged in some way),
we put a
warning log in the code.
- Re: import vs include Re: Porting autogsdoc to OSX, (continued)
- Re: import vs include Re: Porting autogsdoc to OSX, Richard Frith-Macdonald, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Helge Hess, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Richard Frith-Macdonald, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Peter Cooper, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Pascal Bourguignon, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Dirk Theisen, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Richard Frith-Macdonald, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX,
Richard Frith-Macdonald <=
- Re: import vs include Re: Porting autogsdoc to OSX, Helge Hess, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Richard Frith-Macdonald, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Pascal Bourguignon, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Richard Frith-Macdonald, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Dirk Theisen, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Nicola Pero, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Dirk Theisen, 2002/02/27
- Re: Porting autogsdoc to OSX, Adam Fedor, 2002/02/26
- Re: Porting autogsdoc to OSX, Marcus Müller, 2002/02/26
- Re: Porting autogsdoc to OSX, Pascal Bourguignon, 2002/02/26