Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 185335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:27:06+00:00 2026-05-11T15:27:06+00:00

What about a feature in an upcoming Delphi version enabling that? Maybe it could

  • 0

What about a feature in an upcoming Delphi version enabling that?

Maybe it could be a compiler switch promoting all **private**s to **strict private**s.

… or it could be a feature of the new non-legacy compiler font-end Nick Hodges was talking about. => private does always behave like strict private.

EDIT: The reason why I want this is because I just don’t want to add thousands of stricts to my private modifiers. Furthermore the ‘strict private’ behavior is the default behavior in any object oriented language I’m familiar with!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T15:27:07+00:00Added an answer on May 11, 2026 at 3:27 pm

    The current private implementation is private to everything outside the unit it is declared in. So if your reasoning for not wanting to add the strict statements is that you don’t want to modify your existing units, then you have nothing to gain except breaking any existing code that accesses the class in the same unit. As long as your existing units are not modified, then the difference between strict and non-strict private is academic.

    If your reasoning for the strict behavior is to use the compiler to help you refactor code that takes advantage of the less-private behavior, then adding the strict to one class at a time is a good incremental approach so you can get to a compilable and testable state more often. A whole sale change of behavior would require fixing every violation before you knew if any of them worked.

    The reason private behaves like it does is similar to C++’s friend – it allows certain classes (or procedural code) to access private members. The VCL and RTL makes heavy use of this behavior, so a compiler switch or an all out change would break all of that code.

    Delphi’s implementation of private is private enough for all practical purposes since typically you control the unit your class is declared in. If you only ever declare one class per unit, and never include procedural code, then the difference is only academic.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I read about an inheritance feature in PostgreSQL that seemed pretty neat. Unfortunately I
I had read somewhere about one specific feature that is present in awk but
I'm about to implement a feature on my website that recommends content to users
I remember that I've heard about a flash cs5 feature which lets the developers
I'm disappointed that dart doesn't feature weak references. Is there something about compiling to
I have some doubts about the design of C#'s upcoming async/await feature. The convenience
HI All, i wish begin to work about a feature new for me ,i'n
That's about PMD static analyzer's feature: Copy-Paste Detector. Yes, I read http://pmd.sourceforge.net/cpd.html thoroughly. But
I'm wondering about a feature in Visual Studio. Personally it bugs me when I
I'm trying to learn about this feature of javascript I keep seeing in code,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.