Could people please have a look at the source before posting stuff here? This is not a project to be taken seriously and a waste of time. "Someone at Microsoft was playing with Ruby" is the only valuable thing you can get out of it.
PR here: https://github.com/Reactive-Extensions/Rx.rb/pull/1
The pull request sat in limbo until just over a week ago when Matt asked me to sign the Microsoft open source contributor agreement, which I haven't got around to yet.
Unfortunately I don't hold much hope for the library in its current state.
The code very much looks like C# to me. It echos C# in both OOP style and organization: There are multiple classes per file (allowed in Ruby but not generally conventional). There are implicit Disposable interfaces everywhere -- I guarantee that somewhere there's C# code that says:
class MutableDisposable : Disposable
and so on.Also, class variables.
This doesn't look like a good-faith attempt at becoming involved in the Ruby community, but rather a C# port that was assigned to someone who had just enough Ruby experience to pull the code over.
I supposed that makes it somewhat understandable? It's clumsy, but it looks to me like the result of some PM or tech lead up in Redmond deciding that not porting ReactiveExtensions to Ruby was worse than a clumsy port to Ruby.
Observable.throw(Exception.new("woops!")).subscribe(Class.new(Observer) do
[...]
end.new)
http://rxrb.codeplex.com/SourceControl/latest#lib/Rx.rb (bottom)Even if the method were named sanely and consistently `Observable::on_error`, I still don't want to write code like the above.
BTW, I don't see any class variables in the re-opened Enumerable module.
Yes, the code looks like it is directly taken from Java/C#.
Is there something Microsoft affected you personally with or is it their business practices in general?
But yeah, most stuff ends up on Codeplex.