On Tue, Feb 3, 2009 at 6:27 PM, Eduardo Cavazos <[email protected]> wrote:
> So here's mine. :-) Whenabouts are you scheduled to make the switch to
> multi-methods?

Once I figure out all the design issues involved, mostly relating to
performance. I'm pretty disappointed at how slow Factor's single
method dispatch is right now. There's no inline caching at call sites,
and moving to multiple dispach will only make things worse. So I want
to design a nice, fast dispatch strategy first. This is non-trivial.

The next language change I want to work on, right after the UI
overhaul is done, is moving towards stronger static stack effect
checking. This will make code more robust and enable some code to
compile with optimizations which doesn't get optimized now
(higher-order code that stores quotations inside objects, rather than
just passing them down through a chain of inlined combinators). That's
going to be a huge win.

Once this is done then it will be time for multi-methods, I think.

> The switch to multi-methods is going to
> be one of those tectonic shifts in the code base.

I don't think its going to be a big shift. Most generic words will
only do single dispatch anyway; I recall reading a paper where several
large code bases that used CLOS were analyzed, and something like 5%
of generic functions actually had methods to dispatch on more than one
argument. That's not to say they're not useful, but I think you're
overstating their importance and impact.

> And
> by "switch over" I mean that single dispatch is totally phased out.

Well multimethods offer a superset of the functionality of single
dispatch, so I'm not sure what you mean by this.

> In fact, I'm a little surprised that you did the ui overhaul before
> switching to multi-methods; the ui will be hugely impacted.

Right, but the UI was already in a bad shape from a long series of
incremental changes. It hadn't kept up with improved idioms and
abstractions. I'm looking forward to using multimethods in a few
places in the UI, mostly relating to the implementation of gesture
dispatch, but I don't think it will be a huge change.

Slava

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to