[Ironruby-core] A nicer syntax for generic extension methods
ryan.riley at panesofglass.org
Wed Feb 3 13:05:46 EST 2010
On Wed, Feb 3, 2010 at 10:59 AM, Ivan Porto Carrero <
ivan at whiterabbitconsulting.eu> wrote:
Just an example, though perhaps not the best. :)
but may i ask why you're so hell-bent on linq?
I mostly want some way to use the Reactive Extensions for asynchronous
programming and OpenXML SDK for working with Office docs. In particular, I'm
thinking of working with IR on top of other C# and/or F# libraries which
might be using one or both of those libraries. If I were to write it in all
Ruby, I'd probably look at eventmachine for an event loop processor.
I'm definitely open to other solutions.
> Linq is a really bad match to ruby with the expressions. it would require
> some significant amount of work to get that to work correctly. AFAIK there
> is no way in IronRuby to build expressions except use the raw API, but
> nothing is in there yet that makes this easier to do.
L2S uses expressions, but I don't think everything uses them. If all that's
required is a delegate, that's not so hard and can be be accomplished with a
wrapping Ruby method that accepts a block and wraps the block into a Func to
pass into the LINQ method. Given some of the previous posts, I think
creating a general module to wrap these methods shouldn't be too difficult.
Anyway you can reuse anonymous types did you know that? Alex James learnt
> the trick from Wes Dyer
Yeah, I knew about that, but I don't really want to touch casting by example
in Ruby. It might not be bad, but why bother when I can use something from
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironruby-core