that’s not the bug here. they got caught by precedence rules
Re:I Love Ruby
by matthewowen on Tuesday December 19, 2023 @08:19AM
(#38695160)
I suppose “|| and or” mean different things was a little too loose or broad a way of expressing that, but I agree what the big is and you see how it fits in with my overall point I’m sure
I believe what GP is saying is: coming from python, which uses `and` and `not` and `or` you expect those to be the binary operators in ruby as well. You are then surprised when they behave unexpectedly. Who is then to blame for your frustration? Is ruby a bad language for having both `and` and `&&`, or are you at fault for not doing enough research? (I don't see why someone coming from python would look any further after trying `and` and seeing that it seems to work just fine).
I think this is an unfortunate situation, but one that doesn't really happen to someone that does ruby day-to-day; so it shouldn't really factor in as an argument to write ruby off.
But then is being surprised by `["0","1","10"].map(parseInt) // => [0, NaN, 2]` in JavaScript a sign of bad language design or does it just mean that you don't have enough experience with the language yet?
I’m not saying that it isnt valid to criticize these things: first time use of a language matters, people work in multiple languages, it is good to be intuitive.
But in practice, these things aren’t problems for people who work regularly in these languages, so I personally find them to be quite low salience.
I recognize that this is sort of similar to the claims the hypothetical user of php makes in “php is a fractal of bad design”, but personally I find think the issues are of a different nature.