Frequently Asked Questions (FAQ)
The word Dao comes from Chinese, with the basic meaning of path or way . It also means fundamental principles , as a concept commonly found in ancient Chinese philosophy, in particular, Taoism and Confucianism. Dao and Tao are two different Latin spellings, based on different pronunciation in different regions of China, of the same Chinese word.
In the May of 2004, the author (Fu Limin) needed to use Gene Ontology (GO) to do some analysis, and tried to write some Perl scripts to parse GO files. Then he found the syntax of Perl was rather frustrating, and started to wonder could himself develop a new language with cleaner syntax. So he spent some time to give it a try, and found it was challenging and very fun (in fact, it is too fun to stop) to develop a programming language. This language was developed under different names, initially as Yuan , then as Tao , and finally fixed as Dao (in later 2005). However, before 2006, the language was very different, and the implementation was completely different from what is now. In the begenning of 2006, the author was attracted and convinced by the design of the Lua 5 virtual machine, and started to design and implement the Dao interpreter as a new virtual machine with ideas inspired by the Lua virtual machine and its instruction set. Since then the language has also been re-designed under the name Dao.
To be distinctive is not the primary goal of designing this language, Dao is not a language for the sake of language. Dao is meant to be a practical language with simple and clean syntax with reasonable efficiency, and with possible integration of nice features from other languages, or features not widely seen in the mainstream languages but regarded to be important to a modern language. However, there are something distinctive of Dao, for example, the BNF-like macro system for meta-programming, which allows writing macros to define new syntax in forms similar to the BNF representation of syntax. This macro system is a unique invention in Dao and should be enough distinctive. There are also other distinctive features such as a simple, light-weighted and parallelized regex engine, asynchrous function call and an actor model based system (experimental) to combine concurrent and distributed programming in a unified way. Dao also includes some other features not very distinctive, but very good and yet not widely available in the mainstream languages. One example is the optional typing system, which is one direction for future programming languages. Another example is the transparent interface of Dao to C/C++ programming languages, which allows the easy creation of an automated tool to wrap C/C++ libraries automatically.
Optional typing is a language feature that allows variables to be declared with or without explicit types. In Dao, when a variable is declared without a type name, the compiler will try to infer the type of the variable based on how the variable is initialized or how value is assigned to it. Static type checking is performed on variables with explicit types and variables with successfully inferred types. For other variables, dynamic type checking is performed.
Generally speaking, Dao is fast compared with other mainstream scripting languages. However this isn't always the case, sometimes Dao could become slow, in particular, when there are very frequent function calls. That's because a function call in Dao may involve much running time type checking for parameters, which is not optimized yet. In other cases Dao should be reasonably fast. So if you run the example programs for the The Computer Language Benchmarks Game , you will find Dao is slow for binary_tree and meteor , but fast for the others except regexdna , which is also slow possibly because the Dao regex engine has to handle Multi-Bytes String (MBS) and Wide Character String (WCS) at the same time. By the way, the starting up of Dao is a bit slow, but this is not an issue if your programs run longer than a second.
Dao is designed to be a general purpose programming language with no specific targeted fields. However, the development of Dao was partially motivated by the factor that bioinformatics needs a programming language that is superior than Perl and R, at least regarding the aspects of code readability and efficiency. With the maturation of the language and the availability of more and more modules, the application of Dao to bioinformatics should be quite promising. The application of Dao is surely open to any other field as well, if someone finds it to be useful in his/her field and needs some support of the language, just contact the author.
|
Copyright (c) 2009-2016, Limin Fu |