I'd recommend against node patching v8 unless absolutely necessary.
Don't get me wrong, I think __methodMissing__ is a great idea, and
I've voted for this functionality on the v8 and webkit bugs. But it's
not strictly necessary from a functionality pov.
It's already possible to write a function that takes a method name as
the first param. What can't you do this way that you can do with
__methodMissing__? It's a bit uglier, to be sure, but JavaScript is a
little bit ugly at times, and I think that, while that's not ideal,
it's not completely terrible either.
There are issues with adding __methodMissing__ to the language
specification, and anyone who's serious about seeing this implemented
should try to go have that discussion in the ES groups. In my
opinion, that's where this should happen, not in a project like node.
</$0.02>
On Dec 10, 4:24 am, Micheil Smith <
mich...@brandedcode.com> wrote:
> I'm also planing to write a form of ORM, especially after just seeing
> the good looking work from Eric Fredricksen. Maybe we should collaborate
> on ideas at some stage?
>
> - Micheil.
>
> Matthew Kanwisher wrote:
> > Method missing is incredibly useful for creating activerecord style
> > orm. The other option is to pre generate all the methods you would
> > need in advance, which might make for some giant vtables not sure how
> > much slower the performance would be. I'm seriously thinking about
> > hacking out an ORM solution for Node.js however I'm wondering if
> > something like memcache would be a more useful interface, since most
> > node apps are going to be notification engines.
>
> > ~Matt
>
> > On Wed, Dec 9, 2009 at 6:18 AM, Erik Corry <
erik.co...@gmail.com
> > <mailto:
erik.co...@gmail.com>> wrote:
>
> > 2009/12/9 Rakesh Pai <
rakesh...@gmail.com
> > <mailto:
rakesh...@gmail.com>>:
> > > This is a tough one. __noSuchMethod__ is great for building any
> > kind of DSL.
> > > For example, Rails used/uses the equivalent of this all over the
> > place to
> > > make things like the ORM super easy to use.
> > > Any idea if this can be built as an extension to V8 that plugs in
> > > externally?
>
> > The necessary hooks are not present in the API, sorry.
>
> > > On Wed, Dec 9, 2009 at 12:06 AM, Daniel N <
has....@gmail.com
> > <mailto:
has....@gmail.com>> wrote:
>
> > >> On Wed, Dec 9, 2009 at 10:36 AM, Ryan Dahl