From: "bughit (bug hit) via ruby-core" Date: 2023-05-25T01:11:32+00:00 Subject: [ruby-core:113650] [Ruby master Feature#19682] ability to get a reference to the "default definee" Issue #19682 has been updated by bughit (bug hit). matz (Yukihiro Matsumoto) wrote in #note-24: > ���why not��� is not enough. If there are real-world use-cases, we might reconsider in the future. Where do you see "why not" as a justification? See my previous message. What is your assessment, do these posters understand "default definee" (method definition context)? I see no evidence of it. Even ruby contributors, with ticket rejection privileges, who should know better, keep conflating it with Module.nesting[0] and saying things like "these things are things Ruby needs to track internally, but the user probably has no need for" and "it may be accidental behaviour or underspecified". Can you believe what you're reading, matz? Turns out a ruby programmer doesn't need to think about where their methods are defined. In fact you probably should not use `def` at all as the method definition context may be accidental/undefined behavior, so perhaps you methods will jump around from time to time. This is what obscuring the method definition context has wrought. It's clear that exposing the "default definee" would help users understand ruby better. I would have thought that is your objective, but if you want to keep it mysterious, well, so be it, its your language. ---------------------------------------- Feature #19682: ability to get a reference to the "default definee" https://bugs.ruby-lang.org/issues/19682#change-103293 * Author: bughit (bug hit) * Status: Rejected * Priority: Normal ---------------------------------------- https://blog.yugui.jp/entry/846 "default definee" is a pretty important context so why not make it easy to identify? Could be a Module class method or a global method (Kernel) or a keyword. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/