Hacker News new | ask | show | jobs
by peteforde 4949 days ago
I'm a Ruby developer, but it's late and I'm tired: in plain English, what does this library get me and why does it cost $190?

I mean, there's lots of fun stuff in Ruby core (and a huge amount many Ruby devs are often unaware of) but if I'm ultimately still working in JavaScript, this hits a lot of walls. ES6 will allow something like method_missing, but we're not there yet.

Also: blocks.

1 comments

You can use the same methods in JavaScript that you're using already in Ruby. Same arguments, same behaviour, same return values. No mental overhead switching back and forth from Ruby to JS.

Blocks in RubyJS translate to functions (as the last parameter). They work pretty much the same in RubyJS. You can break out of a loop using a breaker object.

It's not about the Ruby object model and metaprogramming capabilities but about the core library.

Especially as Ruby developer if you switch to JS you spend an inordinate amount relearning a new (IMO not so convenient) standard library.

Also RubyJS methods are chainable by design (methods return other RubyJS objects. So you can write:

    R([1,2,3]).map(...).join(',').capitalize().ljust(50)