3 ms·
Crystal could be a really powerful tool for enhancing existing Ruby code. Imagine a world where you write your code in Ruby, but farm out the expensive operati
by deedubaya 10y ago
Crystal could be a really powerful tool for enhancing existing Ruby code.
Imagine a world where you write your code in Ruby, but farm out the expensive operations to a Ruby-like Crystal extension (similar to what is commonly done with C or Rust). I think this is possible already (just after a quick Google search[1]), just not friendly for the average Ruby dev to implement.
[1] https://www.slideshare.net/AnnaKazakova/how-to-write-ruby-extensions-with-crystal https://www.slideshare.net/AnnaKazakova/how-to-write-ruby-ex...
- shawn42 10y agoNeat. Thanks for posting that. Hopefully, that process could be cleaned up and streamlined as a lot of it would be repetitive boiler plate.
- prh8 10y agoThis is definitely possible-- I've done even more than basic PoC (Anna's slide deck was one of my starting points in fact). https://github.com/phoffer/crystalized_ruby https://github.com/phoffer/crystalized_ruby
- pjmlp 10y agoWhen I look at Crystal, what comes to my mind is that it is what Ruby could have been if the community had taken Dylan as inspiration in regards to language design and tooling.