Ayende @ Rahien

Hi!
My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:

ayende@ayende.com

+972 52-548-6969

, @ Q c

Posts: 18 | Comments: 81

filter by tags archive

WantedMethodMissing

time to read 1 min | 104 words

I am listening to this webcast, talking about dynamic dispatch on the JVM, and 19:30 it starts to get really interesting. The JVM is getting support for MethodMissing. As far as I understand, this is most relevant for compiler writers, but it is something that I really would like to have on the CLR (and exposed for C# & VB).

The reason for wanting this is very simple, it lets me handle advance scenarios very easily. Take a look at Boo's duck typing capabilities to see some of the stuff that can be done with it.

More posts in "Wanted" series:

  1. (30 Mar 2007) MethodMissing
  2. (27 Dec 2004) Explanation about Word

Comments

shawn hinsey

One of the main reasons I am interested in method_missing style features in the CLR is that you can emulate the way that ActionScript 3 handles XML documents, which is, I think, pretty awesome.

hammett

Wow! JVM rules!

Kevin Williams

It can be abused, though. In Ruby land, many projects like Camping and RSpec (and even Rails) were reaching a point of collisions and nearly impossible debugging. RSpec is being redesigned to have only a couple of method_missing handlers rather that hundreds.

Ayende Rahien

Do you really want to see the code where the whole application is nothing but anonymous delegates and operations on anonymous delegates?

There is not doubt that it can be abuse. Hell, just recently Rhino Mocks, NUnit and MbUnit had to do some name space shuffling because all of us wanted the "Is" class for fluent interfaces (but I was there first :-) ).

I still want this feature.

Kevin Williams

You mean like Functional Programming? Yeah, it's hard to look at but very powerful. Not for the meek.

I want methodmissing too! Better to empower the developer than disable them. I'm just saying that methodmissing is "the nuclear option" - use sparingly if you want to stay sane. How you have stayed sane in all the the über-coding you do is amazing. :)

Ayende Rahien

No, I am not talking about functional programming, I am talking about functional programming using anonymous delegates, there is a big difference.

I don't agree that it is the nuclear option, I consider run time code generate to the 2nd degree that.

And I don't think that I ever claimed to be sane :-)

Comment preview

Comments have been closed on this topic.

FUTURE POSTS

  1. The insidious cost of allocations - 18 hours from now
  2. Buffer allocation strategies: A possible solution - 4 days from now
  3. Buffer allocation strategies: Explaining the solution - 5 days from now
  4. Buffer allocation strategies: Bad usage patterns - 6 days from now
  5. The useless text book algorithms - 7 days from now

And 1 more posts are pending...

There are posts all the way to Sep 11, 2015

RECENT SERIES

  1. Find the bug (5):
    20 Apr 2011 - Why do I get a Null Reference Exception?
  2. Production postmortem (10):
    03 Sep 2015 - The industry at large
  3. What is new in RavenDB 3.5 (7):
    12 Aug 2015 - Monitoring support
  4. Career planning (6):
    24 Jul 2015 - The immortal choices aren't
View all series

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats