Content deleted Content added
No edit summary |
No edit summary |
||
Line 121:
function IsNull(A : matrix) return boolean written A=0
function IsUnity(A : matrix) return boolean written A=1
== Development status and history ==
Historically, the XL compiler was written in C++. It had achieved a point where most of the features described above worked correctly, but writing plug-ins was a nightmare, because C++ itself is not extensible, so implementing <code>translate</code>-like statements was impossible. The parse tree was more complicated, with dozens of node types, because it was designed for cross-language support. Moka was a Java-to-Java extensible compiler using the same infrastructure.
Abdandoning the cross-language objectives and complex parse-tree structure, a complete rewrite of the compiler was started in 2003. The parse tree was vastly simplified down to the 7 XL0 nodes types now in use. This new compiler [[Bootstrap|bootstrapped]] in 2004, and all new development is now written in XL. However, this new compiler still has very incomplete XL1 support. Suport for generic types is notably deficient.
=== Ancestry ===
XL was inspired by a large number of other languages. In alphabetical order:
* [[Ada_language|Ada]] inspired some of large-scale program support, exception handling, tasking, and supportability aspects.
* [[Basic]], notably in the more modern variants that dispense of line numbers and support structured programming, showed how simple the syntax of a programming language could be. For instance, Basic remains one of the only modern languages to not mandate parentheses around subroutine calls.
* [[C_language|C]] was used as the standard to expect in terms of runtime and machine-level support. XL will not require a virtual machine to run.
* [[C_plus_plus|C++]] and the [[Standard template library]] demonstrated the need for good support of generic types, including implicit instantiation of generics (which Ada lacks).
* [[Fortran]]'s continued performance lead over C and C++ for numerical-intensive applications helped identify which language constructs would prevent useful optimizations.
* [[Java]] demonstrated the importance of a large, portable support library. Java containers also showed the limitations of an approach not based on generic programming. Interfacing with Java code remains an interesting challenge for XL.
* [[Lisp_programming_language|Lisp]] extensibility was considered as a key factor in its survival and relevance to this day. Lisp was the first language to normalize object-oriented features, despite having been designed years before object-oriented ideas were invented.
* [[Prolog]] demonstrated that alternative programming models are sometimes useful and highly productive. Every effort was made to ensure that a Prolog-style plug-in could be written for XL.
* [[Visual Basic]] showed how the parse tree representation can be dissociated from its visual presentation. Few people edit VB Forms textually. It is expected that XL edit-time plug-ins will one day provide similar capabilities, by directly manipulating the parse tree.
|