On Fri, 2 Dec 2022 at 21:49, Anony Mous <fyng...@gmail.com> wrote: > Or... like these non-Python Ruby people that keep mysteriously polluting the > argument - just tell the team "we're not going to do that." Again, problem > solved. You do *not* have to cripple a language to resolve this in any > particular direction. But wait.... you told them and they won't/can't comply? > That's not a language issue. That's a "your team needs different staffing" > issue. >
So if I understand you correctly, the argument is: 1) You want to add a feature that Ruby programmers have a lot of experience with. 2) People on this list who know Ruby tell you "that's a bad idea" 3) You say "That's okay, everyone can just not use the feature!" Seems to me this is a solved problem. Everyone can already just not use the feature! If you have any doubts as to the scale of the problem that Ruby's culture of monkeypatching leads to, check out this quiz: https://railshurts.com/frames/quiz/ As a non-Ruby programmer, my scores were pretty much equivalent to GUESSING. I was completely unable to distinguish Ruby (the core language) from features added by Rails (a web framework). That means, if I were writing some code in, say, a Jekyll plugin, I would have to check very carefully to figure out whether the monkeypatching had been made available or not. Effectively, this means that "Ruby code" and "Ruby code" can be two completely different things. Imagine if this code produces a floating-point value: x = 1 / 3 but this code produces a fractions.Fraction: import fractions x = 1 / 3 This is *insane* and a terrible idea. (Though I wouldn't be averse to something like "1f / 3" where you have a fraction literal. That's different, since the spelling makes it clear.) > You want to write it the hard way, as a loose function that can't handle > class objects like strings? What do you mean, "class objects"? Every object in Python has a type. But if you mean that this is the easy way: some_list.length() and this is the hard way: len(some_list) then I have some very disappointing news for you. Not everything has to be a method. ChrisA _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/CQ3H4CH5SCEK2E7ARX4Q7P5JOU4WTEU3/ Code of Conduct: http://python.org/psf/codeofconduct/