What is Aldor?

Website Developer
8 min readMar 8, 2021

Aldor, in short, is an extension of the now used language Axiom. But it is also important to discuss what Axiom is to get a grasp of what Aldor is. Both are very similar to each other and there are not many differences in the two languages. Axiom is a Computer Algebra System. CA S (Short for Computer Algebra System) is any sort of mathematical software that allows for compression and manipulation of a mathematical expression. In short, the goal of a CA S is to fully automate tedious and seemingly difficult mathematical expressions. Not many are able to fully expand the equation (x-100)*1000 by hand. Even when using the binomial theorem, it would take a very long and grueling time to fully expand this equation. CA S is there to fully expand the equation within seconds of inputting the equation.

Axiom is one of many different Computer Algebra Systems. Including Aldor and Axiom, there is Maple, Cadabra, Maxima, and many others. In total there are about 40 different Computer Algebra Systems. Most of them seem to follow a similar syntax as well. They include the usage of if and else statements. They also include for loops which are very common amongst other computer programming languages and not just CA S. But these languages also differ from each other in specific ways. Maple provides an interactive problem-solving environment, complete with procedures for performing symbolic, numeric, and graphical computations. At the core of the Maple, the computer algebra system is a powerful programming language, on which the Maple libraries of mathematical commands are built.

Going back to Aldor, Aldor is a programming language with an expressive type system well-suited for mathematical computing and which has been used to develop a number of computer algebra libraries. Originally known as A#, Aldor was conceived as an extension language for the Axiom system but is now used more in other settings. In Aldor, types and functions are the top-notch values that can be created and changed within programs. Common support for dependent types allows static checking of dynamic objects. What could this mean for your average everyday user? Aldor solves many difficulties encountered in widely-used object-oriented programming languages. It allows programs to use a natural style, combining the more attractive and powerful properties of functional, object-oriented, and aspect-oriented styles.

How did Aldor originate?

Understanding Aldor means understanding what Axiom originally was. Axiom is a computer algebra system that consists of an interpreter environment, a compiler, and a library, which defines a strongly typed hierarchy. Its history is a very complex one. From being a scrapped idea to becoming a common CA S, Axiom was first named Scratchpad. The very start was first developed in 1965 by James Griesmer who was an important foundation in the start of computer algebra systems. Scratchpad was written in Fortran which is a very high-level language that is used for many different things such as predicting the weather, geophysics, and computational physics. But as stated before, this software stopped in its tracks of development due to unknown reasons. It was finally brought back in the form of Scratchpad II which was developed in 1977 at Thomas J. Watson’s research center.

Many contributed to the creation of Scratchpad II but the few notable creators were Richard D. Jenks and David Barton. Not much information is disclosed about these two individuals. Apart from this though, Scratchpad II was well under development and continually made progress until 1990, when IBM decided that the product should go commercial. Here, it is given a new name, which is Axiom.

Now that the short history of Axiom is known, we can finally move on to discussing Aldor. Aldor is not much different from Axiom because it is simply an extension of it. A very simple example of how these two languages are not very different can be expressed with this function.

This hello world function written in Axiom is a very simple one. There are comments using # to state the function. Then you have the statement: hello which then follows parentheses and then the name. It follows with a print statement saying hello and the name of the variable. It then prints into the output as hello world!

This is the way to write a hello world function in Aldor. It is slightly different with the usage of the statement stdout which means standard output. This is commonly used in Java and C. Then it follows with the statement hello world! One thing that is completely similar is the usage of # to create comments.

Benefits/disadvantages: What’s good and bad?

As Aldor is not a high-level language and follows a similar syntax to other algebra calculating languages as well as mainstream languages, it is not very difficult to learn the language as a whole. It is, however, not very useful in coding anything else, mostly other than algebraic calculations. For example, trying to code a game using Aldor would be very hard and almost impossible to achieve. On the other hand, when it comes to finding tough algebraic equations that won’t be possible by hand, it is very efficient in its job. The scientific calculator that you would use in math class is most likely coded in Aldor or another computer algebra system.

It would also be a drag if your calculator took as long as a regular human being to find the parabola of an equation or the condensing of a long equation. This is where Aldor has a great advantage over other mainstream languages. Not only does Aldor calculate those sorts of equations with blazing speeds, but it is also much easier to write the code that executes those equations with such speeds. If you were to try to create the same process with another language such as python, it would take forever defining variables and there will most likely not be a statement that can execute such equations. On the other hand, Aldor has statements such as “Integer” and “Arithmetic Type.” These statements make it much easier to create the code that solves the equation.

Aldor fits the name, “A Language for Describing Objects and Relationships.” Aldor is unusual among compiled programming languages, due to the fact that types and functions are first-class: that is, both types and functions may be constructed dynamically and manipulated in the same way as any other values. This provides a natural foundation for both object-oriented and functional programming styles and leads to programs in which independently developed components may be combined in quite powerful ways.

The primary considerations in the formulation of Aldor have been generality, composability, and efficiency. The Aldor language has been specifically designed to admit a number of important optimizations, allowing compilation to machine code whose efficiency is frequently compared to that produced by a good C or Fortran compiler.

Syntax: Examples of code

Almost all computer programming languages have if statements and loops. If statements are crucial in programming because it serves as a sort of true or false blockage that only lets the code continue if it is true or not. To be exact, they are conditional statements that tell a computer what decision to make depending on the true or false test. So If statements are a pretty big deal when it comes to writing in essentially any language.

Loops don’t fall too far behind in importance as well. Loops are also used in almost every language because of the purpose it serves. Loops are so crucial because it saves them time and sanity of a programmer that is trying to write a line of code that executes something a certain amount of times. Without the usage of loops, the programmer would have to write the line of code he wants to execute, however many times is needed. If someone had to print out “Hello World.” 500 times, without loops, they would have to write that same line 500 times. All of that is a big hassle and takes way too much time even to copy-paste using ctrl-c ctrl-v.

Not all programming languages use loops and if statements the same way though. Aldor follows a similar style of if statements as Java. In Java, an if statement would be written like this:

Java seems to make the usage of curly brackets after each line is written. After the if(amount < 0) comes a curly bracket. Then it is closed with another curly bracket 1 line after the next line. While Aldor is not completely the same, it also seems to make usage of the curly brackets as well:

We can see here that Aldor also employs the usage of curly brackets. The difference is that the brackets are not used as often as Java. There is one after the line that says String == and another at the end of the string of code.

Loops are not very different from Aldor as well. Most languages create for loops with “for (variable)” and then what they want to loop. As explained before, loops are crucial when coding because many things require the repeated process of a certain line or a piece of code. Loops in Aldor look like this:

After the “for” comes a variable, “x” and then the rest of the code. The for and the variable is a commonly used way of writing for loops. In almost any programming language, it uses that exact way to write for loops. Now let’s compare the way Aldor writes it, to the way Java writes it:

Java also uses “for” but the variable here is something more than just a singular letter. In place of the letter “x”, where it says (int i=0; i < str.length(); i++){. As for similarities, everything ends there.

Takeaway of Aldor

The origins of Aldor extended from Axiom. Axiom was in sense the parent language of Aldor. Without the creation of Axiom from the start, Aldor most likely would not have become a language that can be used to do algebraic calculations. There are similarities and slight differences between these languages. Though Aldor overall is not a very common or popular language, when used correctly, it can work just as well as any other language.

--

--