<div dir="ltr"><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Currently there are the values<br>
DW_ACCESS_public DW_ACCESS_private DW_ACCESS_protected<br>
<br>
FreePascal has more (list at the end of mail)<br>
Could those please be added?<br>
<br>
<a href="https://www.freepascal.org/docs-html/ref/refse35.html" rel="noreferrer" target="_blank">https://www.freepascal.org/docs-html/ref/refse35.html</a><br>
> Private<br>
> All fields and methods that are in a private block, can only be <br>
> accessed in the module (i. e. unit) that contains the class definition.<br>
> They can be accessed from inside the classes’ methods or from <br>
> outside them (e. g. from other classes’ methods)<br>
> Strict Private<br>
> All fields and methods that are in a strict private block, can only <br>
> be accessed from methods of the class itself. Other classes or <br>
> descendent classes (even in the same unit) cannot access strict <br>
> private members.<br>
> Protected<br>
> Is the same as Private, except that the members of a Protected <br>
> section are also accessible to descendent types, even if they are <br>
> implemented in other modules.<br>
> Strict Protected<br>
> Is the same as Protected, except that the members of a <br>
> Protected section are also accessible to other classes implemented in <br>
> the same unit. Strict protected members are only visible to <br>
> descendent classes, not to other classes in the same unit.<br>
> Public<br>
> sections are always accessible.<br>
> Published<br>
> From a language perspective, this is the same as a Public section, <br>
> but the compiler generates also type information that is needed for <br>
> automatic streaming of these classes if the compiler is in the {$M+} <br>
> state. Fields defined in a published section must be of class type. <br>
> Array properties cannot be in a published section.<br></blockquote><div><br></div><div>From these descriptions, it looks to me like "strict private" and "strict protected" better match the existing meaning of DW_ACCESS_private and DW_ACCESS_protected, respectively (i.e., access is restricted to members of the class rather than the whole module, which is more like what these attributes mean for C++ code). If I'm understanding that correctly, would it be more accurate to add new enumerators for Pascal's plain "private" and "protected" attributes? Say, DW_ACCESS_module_private and DW_ACCESS_module_protected?</div><div><br></div><div>I don't see a need to represent "published" as distinct from "public".</div><div><br></div><div>While we're at it, I see the need to add more descriptive text in the spec to make these accessibility attributes more broadly applicable across languages.</div><div><br></div><div>-cary</div><div><br></div></div></div>