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 945407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:44:48+00:00 2026-05-15T22:44:48+00:00

According to D docs ( http://www.digitalmars.com/d/2.0/attribute.html#ProtectionAttribute ) protected module members are illegal, but compiler

  • 0

According to D docs (http://www.digitalmars.com/d/2.0/attribute.html#ProtectionAttribute) protected module members are illegal, but compiler allow me to do this.

module foo;
protected
{
    int bar; 
}

Is this error in docs, compiler bug or I am doing something wrong ?
Actually this is not the only inconsistency between documentation and reality, so is this reference (http://www.digitalmars.com/d/2.0) are actual ? Is more actual language description exist somewhere ?
My configuration: dmd 2.047, OS Windows 7, x86

  • 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. Editorial Team
    Editorial Team
    2026-05-15T22:44:49+00:00Added an answer on May 15, 2026 at 10:44 pm

    The compiler allows attributes in places where they don’t have any effect. This is unfortunate, because it is confusing. Hopefully they will eventually be disallowed, like some of them already have.

    The online documentation is not complete. If you’re serious about learning D, you might want to buy the book “The D Programming Language” by Andrei Alexandrescu. It was released just a month ago. It covers some things that the online documentation doesn’t. And vice versa.

    You can find a lot of answers by searching the D newsgroup archives, or by asking in the newsgroup, searching the digitalmars site, the D wiki, etc. The docs themselves probably won’t be updated for years, though.

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

Sidebar

Related Questions

According to http://www.rebol.com/docs/core23/rebolcore-15.html You can use change/part to parse and replace but that doesn't
According to: http://www.datastax.com/docs/1.0/ddl/column_family#about-column-family-compression The reason RDBMSs see a performance degredation as a result of
According to http://www.faqs.org/docs/diveintopython/fileinfo_private.html : Like most languages, Python has the concept of private elements:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html According to that article STL isn't suited for game-development. What are your thoughts
According to the CSS docs: http://www.w3.org/TR/CSS21/cascade.html#specificity Specificity is defined by (amongst other things) the
I am following http://www.twilio.com/docs/quickstart/client/browser-to-browser-calls for making a call from browser to browse. According to
According to http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Class.html#getDeclaredMethods%28%29 , Class.getDeclaredMethods() should only include methods declared by the class. However,
According to docs at http://code.google.com/p/minify/wiki/UriRewriting $min_serveOptions['rewriteCssUris'] = false; I should be able to add
a) Quote is taken from http://www.postgresql.org/docs/current/static/tutorial-window.html for each row, there is a set of
According to this article: http://subsonicproject.com/docs/3.0_Migrations Bottom line: if you're a developer that is concerned

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.