Twelve FAQs on Qi


1. What is Qi?

A language implemented in Common Lisp that generates efficient type secure Lisp programs which you can run on any machine.

2. What advantages does writing in Qi have over writing in Lisp?

Quite a few.

  1. Qi uses pattern-matching instead of forcing you to write in CARs and CDRs. Typically Qi programs have 40% of the non-whitespace characters that Lisp programs have.
  2. Qi has optional static type checking. You don't have to pray your program will not crash with a type error in a real application.
  3. Qi is lambda-calculus consistent. It makes Common Lisp understand things like partial applications.

3. If I choose Qi, do I have to give up Lisp?

Absolutely not. In fact you can mix Qi and Lisp functions into one file and load them together. You can use Lisp functions within Qi code with no problems. You can even add to the type discipline of Qi to tell it about the types of functions that you have written in Lisp and it will accept your information.

4. What advantages does writing in Qi have over writing in ML or Haskell?

  1. Qi runs on top of Lisp, which means that Qi inherits all the features of Lisp that ML and Haskell do not have; (think macros, EVAL, hash-tables, property-lists, metaprogramming ....)
  2. Static typing is optional in Qi. You do not have to buy into it if you are dealing with code that is resistant to type checking. Or you can choose to check only that code you are interested in.
  3. The type discipline of Qi is based on sequent notation which is a much more powerful and flexible tool for defining types than that used in ML or Haskell. To find out why click here.

5. Is Qi hard to learn?

For a Lisp programmer; learning core Qi is a 15 minute exercise. The returns are worth it. See the quick introduction Qi for the Lisp Programmer.

6. What documentation is available for Qi?

A lot:

Qi for the Lisp Programmer for a quick 15 minute HTML introduction for Lispers.

Qi for the ML Programmer for a quick 15 minute HTML introduction for ML programmers.

Functional Programming in Qi in HTML; which is a thorough exposition of the language from the ground up. Suitable for people with no functional programming experience. This version contains indexed links to chapters and web sites.

Functional Programming in Qi in PDF.

See also the code studies on the home page.

7. Is Qi free?

Yes. Qi is under the GPL licence.

8. What platforms does Qi support?

Qi runs on CLisp , CMU Lisp, SBCL (May 2007) and Allegro Common Lisp (June 2007). CLisp runs on about every platform you can think of.

9. Is Qi much slower than Lisp?

No. Qi is faster than most hand-written Lisp.

10. Is anything written in Qi?

Yes Qi itself! There are a number of library facilities like Qi-Prolog and Qi-YACC which are coded in Qi or Qi and Lisp. See the projects page on how you can contribute to the Qi library.

SUNY Research Award 2003