Rails and Ruby bake in a lot of really nice, ergonomic features for every day programming, not just larger architectural decisions. For instance I am working on a React Native app in my spare time and so much of Javascript seems tedious. Example is dealing with date ranges.
Contrived example:
import { isWithinInterval, subDays, addDays } from 'date-fns';
const today = new Date();
let range = {
start: subDays(today, 1),
end: addDays(today, 1)
}
isWithinInterval(today, range)
The functions for this kind of calculation has to be imported into any file I want to use them? There seems like a lot of copy pasting of this kind of stuff everywhere in a robust javascript app. I think it's reasonably easy to read and understand, so I don't fault that, it just seems tedious to use tons of libraries that you have to explicitly import everywhere to accomplish simple things. Feels like death by a thousand cuts.Meanwhile in Ruby (with Rails) this is functionally equivalent and is usable everywhere in the code:
Range.new(Date.yesterday, Date.tomorrow).include?(Date.today)
edit: fixed some bugs :)