Maybe you have a different aesthetical sense than the rest of us.
That's perfectly fine, we don't have to like the same things.
But since you questioned, now I'm curious and I would like to ask you: what language in your opinion has the most elegant syntax?
Also if you have 2 extra minutes free, would you mind to code that same one-liner above in that language so we could compare the two?
In Python it's x = sum(range(100000)). You might say that's cheating because there is a specific sum function, but having smart builtins covering common programming cases is exactly what an elegant language offers.
I wouldn't say it's cheating but without using that function maybe we could see more of the language syntax itself. That way we are just seeing method calling.
It is J's 'insert' function. It inserts the verb on the left between the items on the right. I think I've see it called 'apply' for J too, and I think 'reduce' as defined in other functional languages would be correct; it's just that J calls it 'insert'.
I see.....
Anyway, this is elegant to me:
sum ||= (1..100000).to_a.inject(:+)
Maybe you have a different aesthetical sense than the rest of us. That's perfectly fine, we don't have to like the same things.
But since you questioned, now I'm curious and I would like to ask you: what language in your opinion has the most elegant syntax? Also if you have 2 extra minutes free, would you mind to code that same one-liner above in that language so we could compare the two?