News for hackers. Stuff that matters.
Re:Ruby 3.0.0 RC1 by raverbashing on Monday December 21, 2020 @12:25PM (#25497072)
It's not an arbitrary behaviour if you want a well behaved result from it. Same with Python dictionary keys which used to have no intrinsic ordering.

Especially when dir() is more used in interactive applications (and sure, sometimes programatically like in plugin architectures, etc)

Re:Ruby 3.0.0 RC1 by dragonwriter on Monday December 21, 2020 @02:25PM (#25498397)
Because Ruby uses fairly deep metaprogramming much more, idiomatically, than does Python, while “dir() is more used in interactive applications” may be true, that does not imply that “#methods is more used in interactive applications”. And, anyhow, an interactive application that wants the information it asks for will quite often wan’t to impose an organization other than alphabetic ordering.