[Petal] [IDEA] Hash with params

Steve Purkis spurkis at mkdoc.com
Tue Sep 9 13:45:20 BST 2003


On Monday, September 8, 2003, at 08:35  pm, Evan Simpson wrote:

> Steve Purkis wrote:
>> And I assume it would be possible to define prefixes that variables 
>> as arguments so that it would be possible to say 
>> "some/hash/key:somevar" and "some/list/item:someindex"?
>
> Sure!  The prefix implementation can do whatever it likes with the 
> argument, including treat it as a variable name, convert it to a 
> number, or ignore it entirely.

Cool - thanks for the example.  That's much more flexible than 
re-tasking the hash/list with params (though I think that's still a 
good idea for the case I outlined :).

It would be nice to see user-defined prefixes implemented in Petal, 
though it could potentially be a lot of work (I'm not that familiar 
with the core).  Unfortunately I don't have time to do it, but I'd 
second William's vote to add it to the Todo list.

Ta,
-Steve



More information about the Petal mailing list