[PD-dev] BUG: namespace prefixes broken in 0.40

Mathieu Bouchard matju at artengine.ca
Wed Nov 1 15:02:06 CET 2006

On Wed, 1 Nov 2006, Frank Barknecht wrote:
> Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
>> Then to make iemlib/split.pd_darwin work as [split], one would use
>> [declare iemlib] or [import iemlib].
> Syntax suggestion: what about [declare -import iemlib]?

Some consensus on how to do things like that ("keyword arguments") ould 

1. In Flext/Jitter style: [declare @import iemlib].

2. In Unix/Tcl/Toxy style: [declare -import iemlib].

3. In GridFlow style: [declare, import iemlib], where "import" is a 
selector and the name of a method, and the comma is like [initbang].

The use of "@" to mean "attribute" may remind of Ruby, but in Ruby, "@" 
is a kind of variable, not a kind of argument.

The GridFlow style relies on the ability to replace keyword arguments of a 
constructor by a bunch of little messages that modify the object just 
after it's constructed (this is not always possible).

One of (1) and (2) is redundant. Then I wouldn't know which of that or (3) 
to pick. The (3) has the important concept that every option is 
runtime-configurable. That might not be an issue for [declare], but that 
is an issue for other object classes that [declare] would be consistent 

How would you specify multiple imports? It may make the difference between 
Unix style and Tcl style:

   [declare -import foo -import bar] <- unix
   [declare -import {foo bar}] <- tcl

because in tcl style, every time an option is specified, it has to 
completely override the existing option of the same name: it can't add up 
like pd's -lib -path -helppath. Pd doesn't accept {} so here are some 
possible replacements:

   [declare -import (foo bar)] <- GF-style nested lists
   [declare -import foo bar] <- use dash-prefixed symbols as delimiters
   [declare, import foo bar] <- use comma as delimiter

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada

More information about the Pd-dev mailing list