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]

 



Simon Budig wrote:

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.

The more Scheme-like approach would be to add a read syntax which instantiates a "parameter name" type. So, something like "(script-fu-f00-bar ::image image)" (:: being an arbitrary syntactic marker that I just made for which an appropriate syntax macro has been defined; you can theoretically use anything not already assigned to something else), which is internally expanded to "(script-fu-f00-bar #<parameter image> image)" which is then magically converted to however the PDB handles parameter passing by the appropriate Scheme-C glue code.


Not only is this more in keeping with how Scheme is generally used, it's conceptually much cleaner because it avoids overloading quoted interned symbols.

Kelly


[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