[ioke-dev] Re: Re: Tuples for Ioke
- From: Ola Bini <ola.bini@gmail.com>
- To: dev@ioke.kenai.com
- Subject: [ioke-dev] Re: Re: Tuples for Ioke
- Date: Sat, 02 May 2009 22:28:29 +0200
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=XgsfaQclt7LVdKBWz8uTmWwhgNMNGCllA/nx17qRtKXRmUrI7Vpf/UPGOO8TCLZHAT BYnvQqsEowSv5L4zy1Z72ChdCPk99dElvDr/yVZFAplO3DaKGupc4pVMYRarFR+9zYD3 GJEq0IJ2lf592v3H++Zs6tL/1AyXDuaVMLUic=
Good work, Martin.
Martin Dobmeier wrote:
I've just pushed a first prototype (including some simple specs) to http://github.com/mdobmeier/ioke/tree/tuples. This is what you can do right now:No, I specifically DON'T like the invokeMethod approach. If you really need to intercept all messages, you need to make sure you have no mimics.
- Create tuples via "DefaultBehavior Literals tuple" or the empty message (I moved the latter to DefaultBehavior Literals as discussed a couple of days ago).
- For each newly created tuple appropriate accessor methods are generated (_1, _2, ... _n). I chose to not use "pass" because the generation of those accessors is really simple and done in just a few lines of Java code. Furthermore, I was not sure if "pass" would work under all circumstances. Suppose you add a message called "_1" to Origin that does something completely different. Sending "_1" to a tuple would now call Origin's version. Expected behavior, but because of that I thought it more appropriate to generate the messages. By the way, is there a way to intercept all message sends to an object? Like Groovy's invokeMethod()?
- The only other supported methods are "arity" and "asList".Very good.
It's not much, but it works and can be built upon.
The Java code actually maps fairly cleanly to the CLR stuff. It's OK though - Ill fix that when merging. And no, I really don't use Visual Studio... =)
Unfortunately there's not yet a CLR equivalence. I tried, but frankly I lost my first battle with Visual Studio 2008. I couldn't figure out how to import the Ioke sources into a new Solution. Google didn't tell me very much either. Anybody's got any suggestions? Ola, you're not working with VS I suppose?
If there is someone with VS knowledge on the list, it would be appreciated if that person could donate appropriate solution-files, though...
Cheers
--
Ola Bini (http://olabini.com) Ioke creator (http://ioke.org)
JRuby Core Developer (http://jruby.org)
Developer, ThoughtWorks Studios (http://studios.thoughtworks.com)
Practical JRuby on Rails (http://apress.com/book/view/9781590598818)
"Yields falsehood when quined" yields falsehood when quined.
| Martin Dobmeier | 05/02/2009 | |
|
[ioke-dev] Re: Re: Tuples for Ioke |
Ola Bini | 05/02/2009 |
| Martin Dobmeier | 05/04/2009 | |
| Martin Dobmeier | 05/07/2009 |





