6 Sep 08:45
Re: Proposal for Include files/headers
edA-qa <edA-qa <at> disemia.com>
2004-09-06 06:45:22 GMT
2004-09-06 06:45:22 GMT
Slawomir Lisznianski wrote:
> I suggest, rather than introducing another keyword, to enhance the
> workings of the existing "using" language declaration. Also, I'm not
> particularly fond of the idea that a program source code relies that
> there is even a file-system underneath it. After all, classes,
I don't like the idea of being file system dependent either. Though in
interests of portability you need to define at least one mechanism that
users of the language have that *must* be provided by all implementations.
Also note that C++ doesn't say the <> system includes need to be files,
an implementation is also free there to magically define everything they
should include.
> A separate resource would provide necessary mapping information; a naive
> example in XML:
Uggh, the world of XML comes to make something simple extremely robust.
Since, for the most part, people will be using files to define
namespaces and classes, I suggest a simpler format which must be
supported by default:
namespace MySpace = file( "dir/dir/file.h2" ) {
class MyClass = file( "dir/dir/file.h2" );
}
This follows a similar syntax to the language itself so it won't be
foreign to the programmers. It also is very flexible and allows room
for expansion. It additioanlly paves the way to reflection in the
language itself... :)
(Continue reading)
RSS Feed