3 ms·
"I fail to see why this is a good thing." Why what is a good thing? Why that line of code is a good thing? maybe it isn't, maybe arrays need a sum method, mayb
by raganwald 19y ago
"I fail to see why this is a good thing."
Why what is a good thing? Why that line of code is a good thing? maybe it isn't, maybe arrays need a sum method, maybe you could just write:
(1..100).inject { |acc, n| acc + n }
...and get the same result. But the article has nothing to do with why that line of code is a good thing, it is about the fact that being able to modify the Symbol class in this manner is what makes a langauge like Ruby evolve from the bottom up.
So... do you think that is a good thing? Or a bad thing?
- mrtron 19y agoI think that style of code is rather hard to read and really doesn't add any functionality that couldn't be done in a much more readable way in the same number of characters. So I am wondering why the author thinks its so fantastic. As for developing the language, I am usually for flexibility and allowing anything to be modified, however this type of change strikes me as not very useful.
- raganwald 19y ago"I am usually for flexibility and allowing anything to be modified, however this type of change strikes me as not very useful." That's entirely the point. If you are in favour of flexibility, you have to accept that people will use it for all sorts of things, not just ones you like.
- mrtron 19y agoI was talking about the fact that they are making that change on the core language. Providing the flexibility is different from putting it in the language. Anyways, I don't really care, saying anything other than 'I love ruby' is shunned anyways.
- raganwald 19y ago"saying anything other than 'I love ruby' is shunned anyways." Well... I welcome criticism of Ruby. Please say whatever you like in a comment right on the post. I've never shied away from writing about the things in Ruby that irritate me. How else will we progress if we don't scratch when we have an itch?