Project

General

Profile

Actions

Feature #18930

closed

Officially deprecate class variables

Added by Eregon (Benoit Daloze) over 2 years ago. Updated over 2 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:109260]

Description

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.
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0