Hi, Please take my comments with a grain of salt. I've been out of Kamaelia mode for several months now as I've had my head buried in google app engine stuff. I don't have any better suggestions, so I feel like I don't have the right to complain, but... well it's the internets right?
Michael, I can appreciate the goal of trying to make basic things simple. Your suggestion however feels really ... magical to me. I like decorators, really. I use them a lot. But I think decorators are best used to apply one flavor change to the decorated function / class without significantly changing the decorated item's signature. Things like, @run_in_transaction, or @handle_exceptions, or @with_logging, or @memoize, or @with_mutex. All these examples are kind of like aspect oriented programming. The core stays relatively the same while some feature is wrapped around it relatively transparently. But what you've proposed is really a heavily magic @transmogrify. It's turning a function into a class - and then a whole lot more. I've seen lots of very handy decorators that take no arguments (other than the decorated function/class). I've seen a lot fewer handy decorators that take exactly one additional argument. I've not got any decorators that I consider nice to use which take multiple additional arguments. Totally side-stepping the issue that I really dislike the idea of @decorate function -> class, if you wanted to do all that other stuff, may I please suggest you break each piece of functionality up into separate decorators. Like... @inbox @inbox('control') @outbox('signal') @outbox class target_class(foo): pass To my brain, that is easier to process one line at a time than trying to grok the mind-bending: @GeneratorComponent(Inboxes = ["inbox", "control"], Outboxes = ["outbox", "signal"]) Again, please take with liberal doses of salt. Cheers, Steve --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "kamaelia" group. To post to this group, send email to kamaelia@googlegroups.com To unsubscribe from this group, send email to kamaelia+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/kamaelia?hl=en -~----------~----~----~----~------~----~------~--~---