[Pipet Users] Command Compilation in Piper: A Discourse

Alexandre Fayolle Alexandre.Fayolle at logilab.fr
Tue Feb 13 10:12:28 EST 2001

On Tue, 13 Feb 2001, Jean-Marc Valin wrote:

> OK, there's two things here: internally, there's an abstract "Node"
> class, for which each new Node derives (as you see in the screenshot,
> "Constant", "Add" and "ExecStream" all derive from Node). Hovever,
> there's no need to discriminate between things that perform have the
> same function. A string is a string... regardless of whether you use it
> as a flag or a filename. If you look at C, for example, a (char *) or an
> int can be use for whatever you like.

True, but this is not the point. You can use void* pointers in C, instead
of char*. It"s just that sometimes it's nice to differentiate a char* and
a FILE*, for instance: the underlying representation _is_ a pointer (an
int ?), but the _semantics_ are different. 

The meaning of  a command line switch, a filename passed on the command
line, a keyword passed on the command line are different, even if they
are all thrown in char** argv when the program receives them. What Nicolas
meant is that if you give your program a bunch of arbitrary char*, it
won't be able to do much with it. Whereas if you say that this is a
switch, it should be followed by the name of an existing file, then it
becomes possible to process the data.
Alexandre Fayolle
Narval is the first software agent available as free software (GPL).
LOGILAB, Paris (France).

More information about the Pipet-Users mailing list