Re: [Vala] How to use Posix namespace



On Sat, May 2, 2009 at 12:55 PM, Diego Jacobi <jacobidiego gmail com> wrote:
> I have a question about this.
>
> Why doesnt vala or genie implements the "importing" feature by code.
> Than one will not need to add --pkg ...

This is a common sort of complaint from people in the MSWindows camp
who are not used to doing things properly. (Not specifically of Vala
and the --pkg command-line option to the Vala compiler.)

> Like the "import" and "require" of python.

Python doesn't have a "require" directive! :P

> Is this because of the "C# like language" limitation?

I believe --pkg is more akin to gcc's -I and -l (uppercase i and
lowercase L) command-line options, or Apple's gcc extension
--framework. These options tell the compiler where to look (ideally)
for preprocessor stuff and compile-time definitions (via #include) and
where to look for the libraries to be linked.

C# is only one example of more modern languages that compose programs
from modules not by gluing together text (the #include directive is a
feature of the C preprocessor, not of the C compiler, and it literally
just finds a file by filename and inserts the text of that file into
the text of the file currently being processed) but through more
appropriate abstractions (ostensibly the "package.") Java is another
such language you may have heard of.

Surely you wouldn't propose to add a classpath directive to the Java
programming language? ;)

-- 
http://codebad.com/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]