Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You may enjoy using Contracts and the Dry-rb suite. It makes ruby behave in a more functional way without sacrificing the extreme flexibility that is inherit in the language.

There was a good blog post about this from Thomas Reynolds the developer of Middleman a little while ago[0]

[0] https://awardwinningfjords.com/2015/03/03/my-weird-ruby.html



Nope, sorry but just nope. I use dry-validations and it’s fine for what it is, but unless this stuff is at the language level it’s just a hack and janky to use, which sacrifices one of ruby’s main attractions - language aesthetics.

I agree with parent, ruby is a pain to work in, especially if you’ve drunk the FP koolaid. I’m back doing rails again after a while doing react front end stuff and a bunch of own time elixir. Ruby needs to allow more functional programming imo.


Sure, it's definitely a hack on top of the language, but sometimes you don't have the option to rewrite and those tools can make your code more functional without having to switch stacks. It's not perfect, it's just a bit better than the alternative in many cases.


Careful, the dry-rb people are very sensitive. I posted a similar "nope" comment on r/Ruby a few years ago and now I have massively negative karma on that sub.


In my personal experience, Dry-rb is the "bargaining" stage of grief over the current state of Ruby and Rails. When you finally reach "acceptance," you move on to another stack entirely.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: