Skip to content

Classes: make private fields and methods class-private, not instance-private #2297

Description

@catamorphism

And add compile-fail tests to enforce this.

Activity

  1. graydon commented on Apr 25, 2012

    @graydon
    Contributor

    To clarify, this means that two instances of the same class should be able to call one another's private methods?

  2. catamorphism commented on Apr 25, 2012

    @catamorphism
    ContributorAuthor

    @graydon Yes. I actually am not personally in favor of this, but it is what @pcwalton 's original proposal said so I figured I ought to stick to it for now.

  3. brson commented on Aug 2, 2012

    @brson
    Contributor

    Obsolete with max/min classes.

  4. removed their assignment
    on Jun 16, 2014
  5. added a commit that references this issue on Sep 22, 2022
  6. added a commit that references this issue on Apr 2, 2025
  7. added a commit that references this issue on Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions