Re: PDB named and default parameters (was Re: [Gimp-developer] The Mark Shuttleworth offer)

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

 



On Sat, Mar 20, 2004 at 01:34:02AM +0100, Simon Budig wrote:
> Manish Singh (yosh@xxxxxxxx) wrote:
> > On Sat, Mar 20, 2004 at 12:58:25AM +0100, Simon Budig wrote:
> > > For scheme we could do something like this:
> > > 
> > >   (script-fu-foo-bar '("image"    image)
> > >                      '("drawable" drawable)
> > >                      '("radius"   5.5)
> > >                      '("size"     300))
> > > 
> > > or (less clutter)
> > > 
> > >   (script-fu-foo-bar "image"    image
> > >                      "drawable" drawable
> > >                      "radius"   5.5
> > >                      "size"     300)
> > > 
> > > that having said: I don't have much experience with scheme outside
> > > script fu, so there might be a convention out there on how to do named
> > > parameters.
> > 
> > Again there is the problem of differeniating between positional
> > and named usage.
> 
> Ok, thinking some more about it: What about using symbols as parameter
> identifiers?
> 
>   (script-fu-foo-bar 'image    image
>                      'drawable drawable
>                      'radius   5.5
>                      'size     300)
> 
> passing symbols to the PDB doesn't make sense, so this could be used
> to differentiate.

That's a good idea. Unless there's some other standard way of handling
this in scheme (anyone?) this sounds good to me.

-Yosh

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux