3 ms·
Equally maybe. Simpler? I'm not sure, I don't know Python very well. A couple of things I found surprising about Python was having to do the whole `re.compil
by sodapopcan 5y ago
Equally maybe. Simpler? I'm not sure, I don't know Python very well.
A couple of things I found surprising about Python was having to do the whole `re.compile` thing instead of just `//` in Ruby. Also, no one will ever convince me that a list comprehension is simpler than `map` and related functions. Also, it's hard to beat the convenience of libs that let you do `1.day.ago`.
Ruby gets complicated when people start throwing around metaprogramming where they shouldn't.
I do like Python's file == module. Python seems like it would be a good functional programming language but it goes and only allows for single line lambdas.
Again, I don't know Python very well.
- revscat 5y ago> Ruby gets complicated when people start throwing around metaprogramming where they shouldn't. This is true. Thankfully it appears that the broader Ruby community has recognized this as well, and has moved away from metaprogramming to a large extent. It's still there, but you don't see it utilized nearly as frequently as you once did.
- sodapopcan 5y agoI'm fine with it for libraries. In fact, its use in libraries is a lot of makes ruby great! It goes too far when people start sprinkling it in business logic making it impossible to find where anything is defined. I'd say you'd either have to go full-lisp and create an entire DSL for your domain (and document it) or keep it completely out of business logic (which, as you say, the community as a whole has pretty much figured this out).