[Pipet Users] Command Compilation in Piper: A Discourse

Jean-Marc Valin jmvalin at locusdialogue.com
Tue Feb 13 09:47:30 EST 2001

Nicolas Chauvat a écrit :
> > I'd like to comment on your use of "processor", "flag" and "filemane"
> > type of nodes. For Overflow (PL), a Node is a Node and there's no such
> > discrimination.
> I read the page about command-compilation Jeff posted. My experience (with
> Narval and other systems) is that "a Node is a Node" is nice in theory,
> but becomes a problem when you want to enhance the user interface and
> facilitate the writing of programs. If "processor", "flag" and "filename"
> are different things of different types, used for different purposes, make
> it so. Maybe they're all Nodes from a graph/network point of view, in
> which case the solution would be to make them inherit from a common base
> class. But if you don't put into your model the capacity to discriminate
> between a string that is actually a flag and a string that is actually a
> filename, you'll have troubles when you'll want to add things such as "put
> all your nodes in the workspace and I'll help you link them, or tell me
> what you want to do and I'll try to build a network that does it". Yes,
> I'm trying to bring in my AI background :-)

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.


More information about the Pipet-Users mailing list