<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Namespaces</title><link>https://sourceforge.net/p/asil/wiki/Namespaces/</link><description>Recent changes to Namespaces</description><atom:link href="https://sourceforge.net/p/asil/wiki/Namespaces/feed" rel="self"/><language>en</language><lastBuildDate>Sun, 23 Feb 2014 20:58:35 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/asil/wiki/Namespaces/feed" rel="self" type="application/rss+xml"/><item><title>Namespaces modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Namespaces/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -16,8 +16,9 @@

 Element | Expected parent | Valid children | Valid attributes | Description
 --------|-----------------|----------------|------------------|------------
-&lt;code&gt;&amp;lt;namespace&amp;gt;&lt;/code&gt; | N/A | &lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; | &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;final&lt;/code&gt;, &lt;code&gt;module&lt;/code&gt; (optional), &lt;code&gt;access&lt;/code&gt; | Top level item!  The &lt;code&gt;name&lt;/code&gt; attribute should be the fully qualified name of the namespace.  Use the &lt;code&gt;final&lt;/code&gt; attribute (no value needed) to prevent derivation.  If the &lt;code&gt;module&lt;/code&gt; attribute is specified, the compiler should issue a fatal error if part of the namespace is included in a different module.  See the section on [Modules] for more information on modules.  The &lt;code&gt;module&lt;/code&gt; attribute has no effect on namespaces derived from this namespace.  The  identifier lists how code outside the parent of this namespace see this code.  It can be &lt;code&gt;public&lt;/code&gt;, &lt;code&gt;protected&lt;/code&gt;, or &lt;code&gt;private&lt;/code&gt;.  &lt;code&gt;access&lt;/code&gt; is invalid if this is a top-level namespace, but required for nested namespaces.
+&lt;code&gt;&amp;lt;namespace&amp;gt;&lt;/code&gt; | N/A | &lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;script-file&amp;gt;&lt;/code&gt; ([DASIL](Derivatives-DASIL) only | &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;final&lt;/code&gt;, &lt;code&gt;module&lt;/code&gt; (optional), &lt;code&gt;access&lt;/code&gt; | Top level item!  The &lt;code&gt;name&lt;/code&gt; attribute should be the fully qualified name of the namespace.  Use the &lt;code&gt;final&lt;/code&gt; attribute (no value needed) to prevent derivation.  If the &lt;code&gt;module&lt;/code&gt; attribute is specified, the compiler should issue a fatal error if part of the namespace is included in a different module.  See the section on [Modules] for more information on modules.  The &lt;code&gt;module&lt;/code&gt; attribute has no effect on namespaces derived from this namespace.  The  identifier lists how code outside the parent of this namespace see this code.  It can be &lt;code&gt;public&lt;/code&gt;, &lt;code&gt;protected&lt;/code&gt;, or &lt;code&gt;private&lt;/code&gt;.  &lt;code&gt;access&lt;/code&gt; is invalid if this is a top-level namespace, but required for nested namespaces.
 &lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; | &lt;code&gt;namespace&lt;/code&gt; | none | &lt;code&gt;name&lt;/code&gt; (optional) | Lists one base fully qualified namespace using the &lt;code&gt;name&lt;/code&gt; attribute.  You can list as many as needed, each with their own &lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; element.
+&lt;code&gt;&amp;lt;script-file&amp;gt;&lt;/code&gt; | &lt;code&gt;&amp;lt;namespace&amp;gt;&lt;/code&gt; | N/A | &lt;code&gt;access&lt;/code&gt;, &lt;code&gt;identifier&lt;/code&gt; | Provides a way for a namespace to add restrictions to the accessibility of a [DASIL](Derivatives-DASIL) script file.  The &lt;code&gt;access&lt;/code&gt; attribute specifies this and must be set to &lt;code&gt;public&lt;/code&gt;, &lt;code&gt;protected&lt;/code&gt;, or &lt;code&gt;private&lt;/code&gt;.  The other thing this tag does is specify an ASIL identifier as file names aren't valid in ASIL code.  That's what the &lt;code&gt;identifier&lt;/code&gt; attribute is for.  It must be something that isn't used otherwise in that namespace.

 Don't derive from namespaces in different projects
 --------------------------------------------------
@@ -32,3 +33,7 @@
 Access to the contents of a namespace
 -------------------------------------
 A namespace is a little like a class as previously noted.  Normally, anything global are public in nature.  But once you put it in namespace, all declarations directly inside the namespace must include an access qualifier.  Think of your namespace as a class and your declarations are nested in that class.  In fact, ASIL has a class called Namespace that you can access through the reflection system.  The access qualifiers [**public**], [**protected**], and [**private**] are all available.  They mean the same thing they do on a type.
+
+Mixing [SASIL](Derivatives_SASIL) and [DASIL](Derivatives-DASIL) in one namespace
+---------------------------------------------------------------------------------
+One namespace can contain both [SASIL](Derivatives_SASIL) and [DASIL](Derivatives-DASIL) source files.  The two can even call another.  See the discussion in the section [Derivatives] for more information.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Sun, 23 Feb 2014 20:58:35 -0000</pubDate><guid>https://sourceforge.net894e75642ffe8279705a6168eec3eea9bda704e3</guid></item><item><title>Namespaces modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Namespaces/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -16,7 +16,7 @@

 Element | Expected parent | Valid children | Valid attributes | Description
 --------|-----------------|----------------|------------------|------------
-&lt;code&gt;&amp;lt;namespace&amp;gt;&lt;/code&gt; | N/A | &lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; | &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;final&lt;/code&gt;, &lt;code&gt;module&lt;/code&gt; (optional) | Top level item!  The &lt;code&gt;name&lt;/code&gt; attribute should be the fully qualified name of the namespace.  Use the &lt;code&gt;final&lt;/code&gt; attribute (no value needed) to prevent derivation.  If the &lt;code&gt;module&lt;/code&gt; attribute is specified, the compiler should issue a fatal error if part of the namespace is included in a different module.  See the section on [Modules] for more information on modules.  The &lt;code&gt;module&lt;/code&gt; attribute has no effect on derived namespaces.
+&lt;code&gt;&amp;lt;namespace&amp;gt;&lt;/code&gt; | N/A | &lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; | &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;final&lt;/code&gt;, &lt;code&gt;module&lt;/code&gt; (optional), &lt;code&gt;access&lt;/code&gt; | Top level item!  The &lt;code&gt;name&lt;/code&gt; attribute should be the fully qualified name of the namespace.  Use the &lt;code&gt;final&lt;/code&gt; attribute (no value needed) to prevent derivation.  If the &lt;code&gt;module&lt;/code&gt; attribute is specified, the compiler should issue a fatal error if part of the namespace is included in a different module.  See the section on [Modules] for more information on modules.  The &lt;code&gt;module&lt;/code&gt; attribute has no effect on namespaces derived from this namespace.  The  identifier lists how code outside the parent of this namespace see this code.  It can be &lt;code&gt;public&lt;/code&gt;, &lt;code&gt;protected&lt;/code&gt;, or &lt;code&gt;private&lt;/code&gt;.  &lt;code&gt;access&lt;/code&gt; is invalid if this is a top-level namespace, but required for nested namespaces.
 &lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; | &lt;code&gt;namespace&lt;/code&gt; | none | &lt;code&gt;name&lt;/code&gt; (optional) | Lists one base fully qualified namespace using the &lt;code&gt;name&lt;/code&gt; attribute.  You can list as many as needed, each with their own &lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; element.

 Don't derive from namespaces in different projects
@@ -25,7 +25,7 @@

 Organization of namespaces
 --------------------------
-Like Java, two root namespaces are reserved for use by ASIL and platform classes.  Most classes needed for operator of ASIL itself, like Object, will be part of the &lt;code&gt;System&lt;/code&gt; namespace or a namespace inside it.  Most classes needed to implement the platform (the UI and code that talks to the OS) will be inside &lt;code&gt;System.Platform&lt;/code&gt;.
+Like Java, a root namespace is reserved for use by ASIL and platform classes.  Most classes needed for operator of ASIL itself, like Object, will be part of the &lt;code&gt;System&lt;/code&gt; namespace or a namespace inside it.  Most classes needed to implement the platform (the UI and code that talks to the OS) will be inside &lt;code&gt;System.&lt;i&gt;Platform&lt;/i&gt;&lt;/code&gt; where &lt;code&gt;&lt;i&gt;Platform&lt;/i&gt;&lt;/code&gt; is the name of the platform.

 Name your namespaces like you would a Java package using a name based on your project's URL or something else you know will be unique.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Sun, 16 Feb 2014 08:55:33 -0000</pubDate><guid>https://sourceforge.net7dd233ca80adef1829c9c19a1d28aba0a251c17b</guid></item><item><title>Namespaces modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Namespaces/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -16,8 +16,8 @@

 Element | Expected parent | Valid children | Valid attributes | Description
 --------|-----------------|----------------|------------------|------------
-&lt;code&gt;&amp;lt;namespace&amp;gt;&lt;/code&gt; | N/A | &lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; | &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;final&lt;/code&gt; (optional) | Top level item!  The &lt;code&gt;name&lt;/code&gt; attribute should be the fully qualified name of the namespace.  Use the &lt;code&gt;final&lt;/code&gt; attribute (no value needed) to prevent derivation.
-&lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; | &lt;code&gt;namespace&lt;/code&gt; | none | &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;module&lt;/code&gt; (optional) | Lists one base fully qualified namespace using the &lt;code&gt;name&lt;/code&gt; attribute.  You can list as many as needed, each with their own &lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; element.  If the &lt;code&gt;module&lt;/code&gt; attribute is specified, the compiler should issue a fatal error if part of the namespace is included in a different module.  See the section on [Modules] for more information.
+&lt;code&gt;&amp;lt;namespace&amp;gt;&lt;/code&gt; | N/A | &lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; | &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;final&lt;/code&gt;, &lt;code&gt;module&lt;/code&gt; (optional) | Top level item!  The &lt;code&gt;name&lt;/code&gt; attribute should be the fully qualified name of the namespace.  Use the &lt;code&gt;final&lt;/code&gt; attribute (no value needed) to prevent derivation.  If the &lt;code&gt;module&lt;/code&gt; attribute is specified, the compiler should issue a fatal error if part of the namespace is included in a different module.  See the section on [Modules] for more information on modules.  The &lt;code&gt;module&lt;/code&gt; attribute has no effect on derived namespaces.
+&lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; | &lt;code&gt;namespace&lt;/code&gt; | none | &lt;code&gt;name&lt;/code&gt; (optional) | Lists one base fully qualified namespace using the &lt;code&gt;name&lt;/code&gt; attribute.  You can list as many as needed, each with their own &lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; element.

 Don't derive from namespaces in different projects
 --------------------------------------------------
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Tue, 11 Feb 2014 11:18:01 -0000</pubDate><guid>https://sourceforge.net0442786f39609df03e98557b40f71d5626a0d775</guid></item><item><title>Discussion for Namespaces page</title><link>https://sourceforge.net/p/asil/wiki/Namespaces/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;No, there isn't a &lt;strong&gt;using&lt;/strong&gt; statement or clause.  Nor do I expect to add one.  The &lt;strong&gt;using&lt;/strong&gt; statement in C# and Java is something I never understood.  I always explicitly use the fully qualified name of any object or class.  I consider anything else to be unsafe as you don't know where an identifier is coming from.  You also increase the risk of identifer-collisions.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Tue, 11 Feb 2014 10:35:18 -0000</pubDate><guid>https://sourceforge.netbda8a4038c256016bae9a2fcfb464f046cd6d5d2</guid></item><item><title>Namespaces modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Namespaces/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -17,7 +17,7 @@
 Element | Expected parent | Valid children | Valid attributes | Description
 --------|-----------------|----------------|------------------|------------
 &lt;code&gt;&amp;lt;namespace&amp;gt;&lt;/code&gt; | N/A | &lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; | &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;final&lt;/code&gt; (optional) | Top level item!  The &lt;code&gt;name&lt;/code&gt; attribute should be the fully qualified name of the namespace.  Use the &lt;code&gt;final&lt;/code&gt; attribute (no value needed) to prevent derivation.
-&lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; | &lt;code&gt;namespace&lt;/code&gt; | none | &lt;code&gt;name&lt;/code&gt; | Lists one base fully qualified namespace.  You can list as many as needed, each with their own &lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; element.
+&lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; | &lt;code&gt;namespace&lt;/code&gt; | none | &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;module&lt;/code&gt; (optional) | Lists one base fully qualified namespace using the &lt;code&gt;name&lt;/code&gt; attribute.  You can list as many as needed, each with their own &lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; element.  If the &lt;code&gt;module&lt;/code&gt; attribute is specified, the compiler should issue a fatal error if part of the namespace is included in a different module.  See the section on [Modules] for more information.

 Don't derive from namespaces in different projects
 --------------------------------------------------
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Tue, 11 Feb 2014 10:27:25 -0000</pubDate><guid>https://sourceforge.net69bcc6e7d5f86b23ee22940ba7a663dc5bdf1fa0</guid></item><item><title>Namespaces modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Namespaces/</link><description>&lt;div class="markdown_content"&gt;&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;
&lt;p&gt;Namespaces in ASIL are a combination of C++ namespaces, Java packages, and classes.  If Java has a major flaw, it that you can't treat subpackages as part of their parent package.  So if you have "org.mydomain.test" and "org.mydomain.test.sub", stuff in "org.mydomain.test" must access the contents of "org.mydomain.test.sub" with the full package name, at least in a using statement.&lt;/p&gt;
&lt;p&gt;Namespaces in .NET and C++ are better.  Stuff in "System.MyNamespace.test" are implicitly inside "System.MyNamespace".  But ASIL goes a step further with derivation of namespaces.&lt;/p&gt;
&lt;p&gt;You don't need to use a namespace, but limit this option to small projects where you don't import much.  Declaring a namespace means you'll have less risk of a naming collision, both within your project and with other projects you import.&lt;/p&gt;
&lt;p&gt;Unlike namespaces in other languages, ASIL namespaces aren't coded.  That is, ASIL doesn't have a namespace keyword.  You declare them with a namespace definition file which uses XML.  (Tat prevents you from having to declare the namespace in each source file.)  If you have a namespace, the namespace definition file and all source code within it must be inside a folder whose name matches the namespace name, much like Java packages.  So if you have the namespace "x.y.s", you should put your code in the relative path "a/y/s" or "a\y\s" (depending on host OS).  However, if the parent namespaces, "a" and "a.y" in this case, have no code of their own, you can use a single folder called "a.y.s".&lt;/p&gt;
&lt;p&gt;Name the namespace definition file after the namespace and use the filename extension "asil-namespace".  Instead of a separate namespace definition file, you can also declare the namespace inside any XML-based make file.&lt;/p&gt;
&lt;h2 id="the-contents-of-the-namespace-definition-file"&gt;The contents of the namespace definition file&lt;/h2&gt;
&lt;p&gt;Below is a table of elements that can appear inside the  namespace definition file.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Element&lt;/th&gt;
&lt;th&gt;Expected parent&lt;/th&gt;
&lt;th&gt;Valid children&lt;/th&gt;
&lt;th&gt;Valid attributes&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;namespace&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;name&lt;/code&gt;, &lt;code&gt;final&lt;/code&gt; (optional)&lt;/td&gt;
&lt;td&gt;Top level item!  The &lt;code&gt;name&lt;/code&gt; attribute should be the fully qualified name of the namespace.  Use the &lt;code&gt;final&lt;/code&gt; attribute (no value needed) to prevent derivation.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;namespace&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Lists one base fully qualified namespace.  You can list as many as needed, each with their own &lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; element.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="dont-derive-from-namespaces-in-different-projects"&gt;Don't derive from namespaces in different projects&lt;/h2&gt;
&lt;p&gt;It's considered poor form to derive from namespaces in other projects.  Such derivation may cause identifier collisions.  Essentially, everything in the the namespace(s) you're deriving from would appear to be inside your namespace.&lt;/p&gt;
&lt;h2 id="organization-of-namespaces"&gt;Organization of namespaces&lt;/h2&gt;
&lt;p&gt;Like Java, two root namespaces are reserved for use by ASIL and platform classes.  Most classes needed for operator of ASIL itself, like Object, will be part of the &lt;code&gt;System&lt;/code&gt; namespace or a namespace inside it.  Most classes needed to implement the platform (the UI and code that talks to the OS) will be inside &lt;code&gt;System.Platform&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Name your namespaces like you would a Java package using a name based on your project's URL or something else you know will be unique.&lt;/p&gt;
&lt;h2 id="access-to-the-contents-of-a-namespace"&gt;Access to the contents of a namespace&lt;/h2&gt;
&lt;p&gt;A namespace is a little like a class as previously noted.  Normally, anything global are public in nature.  But once you put it in namespace, all declarations directly inside the namespace must include an access qualifier.  Think of your namespace as a class and your declarations are nested in that class.  In fact, ASIL has a class called Namespace that you can access through the reflection system.  The access qualifiers &lt;span&gt;[&lt;strong&gt;public&lt;/strong&gt;]&lt;/span&gt;, &lt;span&gt;[&lt;strong&gt;protected&lt;/strong&gt;]&lt;/span&gt;, and &lt;span&gt;[&lt;strong&gt;private&lt;/strong&gt;]&lt;/span&gt; are all available.  They mean the same thing they do on a type.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Tue, 11 Feb 2014 10:21:37 -0000</pubDate><guid>https://sourceforge.net7bf6dbfe184bae802b1b7e0f083b9325a2ab87e0</guid></item></channel></rss>