Hacker News new | ask | show | jobs
by wrp 2094 days ago
Ruby has been referred to as Smalltalk meets Perl, and the problem of dealing with other people's code is one of the main things that kept me in the past from using Perl on text processing projects. The problem of collaborating in Perl was lessened a lot by adhering to Damian Conway's Perl Best Practices. Is there anything similar for Ruby?
2 comments

Rubocop and you're done. It's the first thing I'd add to any team project just because life's too short for an inconsistent codebase.
This. Rubocop is first class. I'm just flat out done bikeshedding in code. If I'm writing JS, it's an ESLint + Prettier combo — or whatever your taste is, I just don't care. Let's write code and let the machine deal with making sure it isn't too ugly.
Ruby’s heavier use of key words rather than symbols saves it from the worst of Perl.

Yes, there’s still some symbols, but nowhere near as many.

The "line noise" aspect of Perl never bothered me, because I'm already a heavy user of regexes. The cause of my misery was Perl's "There Is More Than One Way To Do It."
TIMTOWTDI is what I loved about Perl and the reason I found the transition to Ruby so enjoyable.
For what it's worth, non-alphanumeric Ruby is Turing-complete: https://ideone.com/55WtMM