From: "shan (Shannon Skipper) via ruby-core" Date: 2024-12-07T02:26:27+00:00 Subject: [ruby-core:120124] [Ruby master Feature#18930] Officially deprecate class variables Issue #18930 has been updated by shan (Shannon Skipper). Can we formally document they are soft deprecated or at least not recommended for use. In the Ruby community we often see new folk struggle greatly with them and have to recommend against their use over and over. ---------------------------------------- Feature #18930: Officially deprecate class variables https://bugs.ruby-lang.org/issues/18930#change-110875 * Author: Eregon (Benoit Daloze) * Status: Rejected ---------------------------------------- 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/ ______________________________________________ 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/lists/ruby-core.ml.ruby-lang.org/