From: "matz (Yukihiro Matsumoto)" Date: 2022-08-02T07:00:59+00:00 Subject: [ruby-core:109408] [Ruby master Feature#18930] Officially deprecate class variables Issue #18930 has been updated by matz (Yukihiro Matsumoto). Status changed from Open to Rejected I admit class variables semantics are a bit complex and sometimes misunderstood. But removing them should cause serious compatibility issues. Class variables are somewhat similar to global variables. We don't recommend using/abusing them, but not going to remove them from the language. Matz. ---------------------------------------- Feature #18930: Officially deprecate class variables https://bugs.ruby-lang.org/issues/18930#change-98557 * Author: Eregon (Benoit Daloze) * Status: Rejected * Priority: Normal ---------------------------------------- Ruby's class variables are very confusing, and it seem many people agree they should be avoided (#18927). How about we deprecate them officially? Concretely: * Mention in the documentation that class variables are deprecated and should be avoided/should not be used. * Add a parse-time deprecation warning, now that we only see those with `Warning[:deprecation] = true` it seems reasonable to add. -- https://bugs.ruby-lang.org/ Unsubscribe: