FAQ

More questions and answers will be added to this FAQ based on feedback. This way we can all benefit. So please be advised that this FAQ page is not static.

Why was Superx++ invented?
What problems does Superx++ solve?
Why is Superx++ based on XML?
What are the requirements for Superx++?
What do Superx++ programs shine at?
What advantage is there in using Superx++ to manipulate XML over other languages?
Why does Superx++ advocate a special tier for XML in software architecture?
How fast are Superx++ programs?
Why bother inventing Superx++? Aren't there enough languages out there?
Is there a sandbox for memory in Superx++?
How do I code "Hello World!" in Superx++?
Why is Superx++ an open source language?
How can I as a C++ programmer help the Superx++ open source effort?
If I am not a C/C++ programmer, how can I help the Superx++ open source effort?
Where can I get the source code for the Superx++ interpreter?
Where can I get help?
How can I send feedback?
What kinds of inheritance does Superx++ support?
How do I define a class?
How do I instantiate/create an object?
What is the Node class?
What are the Superx++ special objects?
Any questions or suggestions about the FAQ?


Why was Superx++ invented?
Superx++ was invented to provide full programming power to XML. XML has already been developed as a good data format for cross platform information exchange and there are a number of technologies for transforming the data, such as XSLT and XSLFO. Still, before Superx++ was invented there was no viable programming language that enabled XML to be anything other than the format that data is written in. Today, we can honestly say that thanks to Superx++ we can write XML code that can encapsulate XML data and perform just the right kinds of manipulations that we programmers want. So instead of using Java, C++ or anything apart from XML we can use Superx++ which is part of XML (because it is based on XML) and we can thereby manipulate the XML data using the special XML keywords. So in a sense, Superx++ has extended XML to include special constructs that add the programmable layer to XML.


What problems does Superx++ solve?
When a programming language is invented there are particular problems that it is particularly suited to solving. Although Superx++ is a general purpose language it is specially suited for working with XML. However, it is not my intention that Superx++ should solely be a means for manipulating XML or for solving problems known today. It is my hope that others can take this language and adapt it to solve problems tomorrow that I have not thought of. C was invented and used to write UNIX more than thirty years ago. Since then the language has been used for everything from embedded system development to web related technologies. As such, I do not find it overly useful to ask this question because it will only answer some of the things that a language is known by the inventor to solve at this current time. That said, here are the things that Superx++ can solve today. The caveat is that the further development of Superx++ may very well solve other problems as well.

1) XML data encapsulation within XML itself-- XML is used as a special means of cross-platform data exchange and RPC via SOAP. It therefore makes sense that the data should be encapsulated in XML itself so that the data and the means of encapsulation can be secured, accessed and transported as an unit within a logical tier. Plus, it also makes sense to secure the XML data within the same tier without a reliance on other technologies: Java and CORBA, C# and .NET, VB or C++ and COM. All of these existing methods enforce that the XML clients (the Java and CORBA, et. al.) must know the details of the XML data and manipulate it directly. On theoretical grounds this undermines the integrity of the XML data as is since it does not stand alone. On practical grounds this means that the cross-platform benefit of transporting the XML data and its encapsulating XML objects is not there at all. In short, Superx++ objects package XML natively. Why is this so? because Superx++ objects are also XML.
2) A neat benefit also of the XML encapsulation that Superx++ offers is that the XML clients can remain unchanged. This is because they will be invoking Superx++ programs which are also XML. So nothing on the XML client side needs to change.
3) The automatic benefit that you get from Superx++ use is that it allows XML data to be adaptive! This is very important in the dynamic systems we have today and also for research in evolutionary systems. This is possible because the Superx++ objects (which are XML) provide the programmatic logic to modify the appearance of the XML data to the XML client based on run-time conditions.
4) Let's face it: nowadays without Superx++, to manipulate XML to any sufficient programmatic degree (with any sort of ease) you cannot use the XML technologies, such as XSLT, XSLFO, XPATH, XQUERY, etc. These all require a fair amount of complexity. Programmers have recognized this already and that is why they turn to Java, .NET, and other language/frameworks to manipulate XML data. Although this is a practical decision that seems logical, it is not a step in the right direction. This is because it violates the integrity of the XML data with invasive access and manipulation of non-XML processes. A better model which is also practical is to use Superx++. Superx++ has a syntax that is easy to learn and quite understandable. If you have used C, C++, C#, Java or most other high level languages then Superx++ will not be hard to master. This means that you can very quickly use Superx++ to access and manipulate XML data in documents or fragments. And at the same time, while you are doing this with Superx++ you are not violating the integrity of the XML data because that data is kept within the XML layer, wrapped safely within the Superx++ objects. Therefore, there is no reason why these Superx++ objects cannot be sent via HTTP to some remote destination, as an unit and still preserve the encapsulation.
5) By the way, there is another benefit of XML encapsulation here, and that is that the Superx++ objects provide a context for the XML data. A context is necessary in any system to make informational sense out of data, which is inherently meaningless without a context. Imagine a system with Java (or any other language excluding Superx++) and XML. That system taken as a whole has a context because you can tell what the data is and what it is for and how it is used. However, the current thought about transporting the XML data to remote destinations is to take the XML data and ship it off via HTTP or whatever. This move breaks the context. The destination can only really know what the XML data means and what to do with it, if and only if the destination is built with a knowledge of the source system. This is bad! The reasons why this is bad are:
i) It forces the context of the source system to remain constant and in sync with the destination system. Therefore the company in charge of the source system cannot modify the form that the XML data takes without consulting the destination company. This means that the two companies must agree and be in sync or the whole model breaks down. This is expensive in terms of human resources, time, money and programmer expertise!
ii) If the source company is bought by another entity who want to change the XML format of the data, then the destination company will not be able to make sense of the data any longer. That is, there is no long-term stability of the XML context!
Some will object at this point and say that XML schemas could provide the necessary context. I would agree to a certain point. The schemas can provide lexical (not informational) definition of the XML format, but if the format were to change then the schema must also change. This therefore brings us back to square one: the source and the destination must BOTH make changes to adapt to changes in the XML format.

The good thing about Superx++ encapsulation is that the entire Superx++ object can be transported from the source to the destination as an unit. This object will expose a public interface that is more stable and long-term than the tenuous coincidental agreement on the XML format shown above between the source and destination. This public interface is what the destination system (that is, the XML clients on the destination which may be Java or other language programs) will invoke to access the XML data via the secure interface of the Superx++ object. Therefore if the source company wants to change the XML format then they can do so while leaving the public interface the same and the impact on the destination will be ZERO! This means that there is less expense for any change on the source in terms of human resources, time, money and programmer expertise!
6) Another benefit of Superx++ is that it allows object oriented features that other popular languages do not. For example, class redefinition. Class redefinition is the ability of a class to be redefined or evolve dynamically at run-time. This evolution has the impact of changing the behaviour of objects that were already instantiated, and of course the subsequently instantiated objects take on the new form. This is useful for modeling changes to entities in the real world.
7) Superx++ also allows zero-cost XML serialization. By this I mean that XML serialization is not implemented by means of the use of special classes as is the case with the .NET languages or Java. Rather, it is founded on a simple premise that sets Superx++ apart from these other languages. Superx++ maintains objects in memory as XML! Therefore an XML node is a Superx++ object and a Superx++ object is an XML node. The ramifications of this are that serializing an Superx++ object or object tree really means simply writing the data to a file. Deserialization is also merely constructing an object out of the XML in a file, which is also done in a single instruction. This makes the whole matter of XML serialization easy for programmers to grasp and use and at the same time it preserves the logical paradigm that we have established: i.e. Superx++ is truly XML through and through!
8) Superx++ allows XML data to be processed as Superx++ code and Superx++ code can be manipulated as XML data. This allows a high degree of flexibility in adaptive and evolutionary programming. This is important-- a lot of research has and is being done in the realm of adaptive programming. Superx++ implements some useful features to allow this.


Why is Superx++ based on XML?
Superx++ is based on XML so that it can automatically gain the benefits that XML enjoys. Some of these are:
- easy transportability: An Superx++ object or program can be transported across the internet via protocols like HTTP and SOAP via port 80 with no fuss whatsoever
- parseability as XML: Any XML parser can parse Superx++ code because it is XML. This has the benefit of enabling people who are learning XML to drill down to the sections they want to study. An example of this can be found by opening any of the demo Superx++ programs in an XML editor/viewer (even a browser like Microsoft Internet Explorer) and you will see that you can expand and collapse the nodes. This enables you to look at the crucial points that you want to view without looking at the rest of the stuff. This is particularly useful at this stage because since the language is this new there are no Superx++ IDEs out there. However, the XML editors and viewers really help quite a bit.
- easy interface with XML clients: An XML client can consume Superx++ objects (because they are XML) just as it would consume normal XML.

Another reason for Superx++ being based on XML is to fill the missing niche in XML development. XML, right now, has no real programming language and the invention of just such a language is a desire that many developers have expressed. The power of making XML have a programming language based on XML is that you are now no longer restricted as a programmer to using XSLT to transform the XML or using the DOM methods found in Java, C++, etc. to transform XML. Now you can actually apply real programming methods (object-oriented and imperative) to manipulate and transform the XML data, right there within the XML itself. You can also construct objects that wrap the data all within XML itself.

A big benefit of this method of XML programming is that none of this changes a single line of code in your XML clients. So if you have a Java or C++ XML client, for example, you need not change that code at all to get the advantage of being able to build switching logic and adaptability into your XML. Instead you can wrap your XML data in a Superx++ object and have your XML clients access that instead. This provides a huge benefit architecturally as well in terms of segmenting data management into its proper tiers. The actual data access and manipulation of XML can be done in XML and this then becomes a service that your XML clients (written in another language) can subscribe to. The result is that your XML client code is simplified and the XML data is encapsulated neatly into its own XML layer. I call this layer the Superx++/XML layer because Superx++ makes this possible.


What are the requirements for Superx++?
To process a Superx++ program you will need a Superx++ interpreter for your operating system. Currently the Superx++ interpreter has been implemented for the Microsoft Windows NT/2000/XP operating systems. The minimum memory requirements for that platform are 128 MB RAM and 100 MB disk space so that you can have ample room to save files. The actual executable of the Superx++ interpreter is under 1 MB. The demo files themselves are also relatively small (a few KB of disk space). I recommend 100 MB of free disk space for tinkering. As far as syntax is concerned, the only statement that is required is the <xpp> statement that encapsulates an entire Superx++ program. Every other statement or construct is optional.


What do Superx++ programs shine at?
1) Providing real encapsulation of data within XML and manipulation of that data. This helps clarify the overall architecture of a system.
2) Generating XML data from database queries and stored procedure calls.
3) Updating database tables with data gleaned from traversals through XML documents.
4) XML serialization-- because all Superx++ objects are XML nodes and vice versa there is no overhead involved in XML serialization because the internal representation in memory of the objects is XML! Therefore all that you need to do is to invoke the save method on the object you wish to serialize. Loading an object from XML (i.e. deserializing an object) can easily be done with the <file> statement.
5) XML access and manipulation-- Superx++ allows all sorts of means for accessing and manipulating XML data in an object-oriented setting.
6) Evolving systems-- Superx++ provides features that enable the modeling of systems that change dynamically over time. Some of these features are:
   - class redefinition
   - object reclassification
   - self-modification of programs
   - allowing a program to save its state and reload it later in order to resume its execution-- this also provides a safety net for programs that modify themselves


What advantage is there in using Superx++ to manipulate XML over other languages?
Superx++ enables programmers to use the same XML clients as they have always been using to access XML datasources that adapt/change/evolve. Often times the datasources that XML clients access are XML files. These files, without Superx++ involvement, are static and so an extra process would be required to modify them if necessary. What Superx++ does is allow the same XML client to access an XML datasource which can change itself. The actual mechanics by which the XML documents change themselves is strongly based on the fact that a Superx++ program is itself an XML document and the Superx++ statements are XML constructs. So with little extra effort it is possible to construct a smart XML document which alters its appearance to the XML client based on certain run-time conditions or parameters. This logic says:
If I am accessed like this or these are the conditions then I must appear like this, otherwise I must appear like that, etc.


Why does Superx++ advocate a special tier for XML in software architecture?
Superx++ advocates a special tier for XML in the architecture of distributed software systems because XML represents a special kind of data. XML is used for cross-platform data exchange and even RPC (via SOAP). As such it is not merely used to store simple data. What Superx++ adds to the mix is the ability to make the XML evolve and adapt dynamically. This is of great benefit as it provides flexibility to the whole system without modifications being made to the XML clients. Currently, this is not possible without Superx++ because Java, C++ and the like all place demands on the XML client to manage the structure of the XML data itself. This is not secure for the special class of data that XML really represents. Neither does this current practice offer flexibility or extensibility in the architecture. What Superx++ provides is a means of encapsulating the XML data within Superx++ objects (which themselves are XML). This forms a special layer or tier in the architecture specially for XML in which access and manipulation is managed by fully-programmable Superx++ objects. Also, the interface to the XML data from the XML client is managed by the Superx++ objects. This therefore means that the actual XML datasource can be switched with no impact to the XML client. All these benefits logically lead us to the conclusion that we need a special tier for XML in software architecture. That is one of the many benefits of Superx++.


How fast are Superx++ programs?
Superx++ programs perform reasonably well. The language is implemented so far only with an interpreter. Future plans include the programming of Superx++ compilers which will produce much faster executables. However, the current speed of a Superx++ program is good for typical web page/XML processing.


Why bother inventing Superx++? Aren't there enough languages out there?
It has been worth while inventing Superx++ because of the features that it has. Superx++ encapsulates XML data in the manner that it deserves, which is something that no other programming language does. This provides security, flexibility and extensibility to the XML data because all access to it passes through the control of the Superx++ objects which provide a special tier for the XML. This tier consists entirely of XML. Part of the XML is the data and it is wrapped in the other part which are the Superx++ objects. Remember, Superx++ is XML! Some of the other benefits that Superx++ brings are:
- class redefinition: The ability to redefine classes at run-time and therefore to model the evolution of types. This is important for dynamic systems and also to model evolutionary systems.
- object reclassification: The ability to alter the class that an object belongs to at run-time and therefore alter its behaviour.
- self-modification of programs: The ability of a Superx++ program to modify itself at run-time and thereby evolve.
- simultaneous object access and manipulation: The ability to access or manipulate more than one object via a single invocation. This is broadcast messaging with a filtering criteria to limit the set of objects to which the message is broadcast.

All these features and many others make Superx++ an unique and useful language.


Is there a sandbox for memory in Superx++?
The concept of a sandbox is present though the term is not used in Superx++. Each Superx++ process gets its own run-time memory space to operate on for its programs. In this manner processes cannot encroach upon each other's memory.


How do I code "Hello World!" in Superx++?
The following code will be a full Superx++ program that returns the string "Hello World!" to the Superx++ client (whatever process calls a Superx++ program):
<xpp>
   <xout>Hello World!</xout>
</xpp>


Why is Superx++ an open source language?
Superx++ is an open source language, as is all the source code and executables for the Superx++ interpreter, so that the development of this new language can become a consensual work. It is not my intention to make Superx++ simply the product of my own mind. That would limit the language from attaining its true potential, but rather the beauty of this project is that you too, as a programmer, can contribute in a real and impacting way on the evolution of this language. This way, we shall all own Superx++ and we shall all gain from everyone's input. And at the end, we shall all be proud. I would frankly rather have such an open source language become a standard where all can contribute to its development, rather than standards set by closed consortiums with memberships restricted to proprietary interests. If you would like to be a part of something that is truly worth while then this project is yours as well. E-mail me at Kimanzi_Mati@hotmail.com and we can collaborate together with other likeminded developers on this work.


How can I as a C++ programmer help the Superx++ open source effort?
We are welcoming all offers of help from programmers all over. If you are a C++ programmer and work on other operating systems you can send an e-mail to Kimanzi_Mati@hotmail.com and join the team. This way we can coordinate the effort. Also, if you are interested in:
- working on the syntax of Superx++
- writing a Superx++ compiler for any platform
- developing a debugger for Superx++
- developing an IDE for Superx++
- developing other tools for Superx++
- if you have an idea for the language that you feel is important
If any of these applies to you, feel free to send an e-mail to Kimanzi_Mati@hotmail.com.


If I am not a C/C++ programmer, how can I help the Superx++ open source effort?
You can support the effort by using Superx++. This offers you the benefit of working on a brand new programming language (this doesn't happen every day!) that is related to a hot field: XML! This will give you early expertise in this new language. The benefit to the language that you provide is your feedback on the useability of Superx++ and the Superx++ software tools. If you are responsible for evaluating new technologies in your company or you are a student, you should seriously consider evaluating Superx++. Your feedback is invaluable to the open source process of the development of this language and by this means you will have contributed to something that affects systems worldwide.


Where can I get the source code for the Superx++ interpreter?
The source code for the Superx++ interpreter is written in C++ and currently runs on the Windows NT/2000/XP operating systems. The source code can be downloaded as a .zip file by clicking here.


Where can I get help?
You can get help by sending detailed questions regarding Superx++ via e-mail to Kimanzi_Mati@hotmail.com. You will receive an answer in a few days depending on the volume of feedback and questions.


How can I send feedback?
All feedback is welcome, will actually be read by a human and acted upon if necessary. Send your feedback via e-mail to Kimanzi_Mati@hotmail.com.


What kinds of inheritance does Superx++ support?
Superx++ supports both single and multiple inheritance for objects and classes.


How do I define a class?
A class in Superx++ is defined using the <class> statement. An example follows:
<class name="XTree" inherit="XPlant">
   <construct>
      <scope type="public">
         <Chlorophylic>yes</Chlorophylic>
      </scope>
   </construct>
   <scope type="public">
      <func type="string" name="GetChlorophylic">
         <body>
            <return>
               <eval object="Chlorophylic" />
            </return>
         </body>
      </func>
      <func type="void" name="SetChlorophylic">
         <parm type="string" name="sVal" pass="val" />
         <body>
            <eval object="Chlorophylic">
               <eval object="sVal" />
            </eval>
         </body>
      </func>
      <func type="int" name="GetAge">
         <body>
            <return>
               <eval object="this" member="Age" />
            </return>
         </body>
      </func>
      <func type="void" name="SetAge">
         <parm type="int" name="sVal" pass="val" />
         <body>
            <eval object="this" member="Age">
               <eval object="sVal" />
            </eval>
         </body>
      </func>
   </scope>
   <scope type="protected">
      <var type="int" name="Age">0</var>
   </scope>
</class>

The statement above declares a class called XTree which inherits from the class XPlant which contains an object called Chlorophylic. Every time an object of class XTree is instantiated it will be instantiated along with a contained object called Chlorophylic. The class XTree also defines four methods and one member variable. For more details on classes click here.


How do I instantiate/create an object?
An object in Superx++ is instantiated using the <node> statement. An example follows:
<node name="MyTree" inherit="XTree" />

The statement above creates an object called MyTree which inherits from the class XTree. This means that it will be possible to invoke the methods of the XTree class on the MyTree object, as well as access its contained object(s) such as Chlorophylic in the case above.


What is the Node class?
The Node class is a class that is inherent to the Superx++ language. It contains many useful methods that are used for node/object manipulation. This makes it easy to manipulate XML data. Due the underlying philosophy behind Superx++: i.e. every XML node is a Superx++ object and every Superx++ object is an XML node, the methods from the Node class are useful for manipulating Superx++ objects as well as XML nodes and trees. In addition, it is important to mention here that every Superx++ object automatically inherits from the Node class and all classes in Superx++ also are derived ultimately from the Node class. So these methods are callable on any Superx++ object. For details on the Node class and its methods click here.


What are the Superx++ special objects?
There are five special Superx++ objects. The names of these objects are reserved keywords so you cannot use their names for objects of your own. These objects offer special services to the Superx++ programmer. These objects can be accessed and manipulated using the Node class methods just like any other object. Here they are:

mem
mem is the run-time memory object. It encapsulates the memory contents of the Superx++ program at run-time. It contains all the instantiated objects and their contents (contained objects, members, attributes and values).

classes
classes is the class run-time memory object. It encapsulates the current definitions of declared classes in a Superx++ program at run-time. It contains all the <class> statement nodes of the declared classes.

exception
exception is the exception object. It encapsulates the type and description of the last exception that was raised/thrown in a Superx++ program.

xpp
xpp is the program object. It is the current definition of the Superx++ program at run-time. Given that a Superx++ program can be modified at run-time, the xpp object is useful in letting you know what the actual current definition of the program is, as opposed to what has been stored on a disk file.

xin
xin is the input stream object. It encapsulates the parameters being passed into a Superx++ program; i.e. the input stream.

More information on the special objects can be found by clicking here.


Any questions or suggestions about the FAQ?
If you have any more questions or something else you would like to see on this FAQ please e-mail Kimanzi_Mati@hotmail.com. Thanks!