MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
Re: Wish list
> Has anyone added this to the wish list yet? {a,b,c}[d]=e
> whichone=args[1];
> stuff=args[2];
> {this.name,this.description,this.aliases}[whichone]=stuff;
You can achieve the same results for the properties above by doing
whichone=args[1];
stuff=args[2];
prop={"name","description","aliases"}[whichone];
this.(prop)=stuff;
which is not too much of a workaround.
What would be nice would be the capability to do the same thing for variables
and builtin-verbs that can be done for properties and other verbs (referring
to them as strings, like in line 4 above), since then you could do
{a,b,c}[d]=e no matter what a, b, and c are.
michael
brundage@math.washington.edu
Follow-Ups:
References:
- Wish list
- From: Kipp the Kidd <mcmudge@mailbox.syr.edu>
Home |
Subject Index |
Thread Index