Mitchell is both a programming language and a compiler. This is the page for
both the programming language and the reference compiler of the same name. The
language definition itself pulls elements from the world of functional
programming (for example, centered around expressions instead of declarations)
but still bears some syntactic resemblance to other languages you've seen
before. It still contains if-then-else, case, and function constructs.
However, all looping is done through recursion.
The source distribution kit includes the current language definition, runtime
library, documentation, and the reference compiler. The main focus of this
system is to be a bootstrapping compiler. That is, the compiler and runtime
will eventually be written in mitchell itself. I make no guarantees as to
the stability of the feature set - features will be added and removed as needed
to meet this bootstrapping goal. The only guarantee is that the source
distribution will behave as documented in the included definition.
Features of the mitchell language include:
-
All Unicode characters are valid identifiers. In fact, several Unicode
characters are already defined by the language. Make sure you have your
terminal and editor set up right. See the grammar for specifics of which
characters are defined. A vim config
file blurb is provided to help you edit Mitchell files.
-
The syntax unit is the expression. In fact, the entire language is built
around using expressions instead of long expression sequences. Additionally,
each expression carries a type with it and expressions can be used in all
sorts of places you may not be used to. This is similar to how things are done
in functional languages, though I do not aspire to that level of sophistication.
-
All code is packaged in modules to aid modularity and reuse. Modules may be
nested inside each other for further modularity.
-
Almost everything is a function - including arithmetic and boolean operators.
Looping is also done via tail recursion instead of a for and while loop
construct. Again, this is functional in style though not nearly as
complicated. The idea is keeping the syntax as simple as possible.
-
Strict type checking promotes type safety and prevents various classes of
errors in programs.
-
Parametric, polymorphic types allow for generic programming and easy code reuse.
-
Support for exceptions makes for easier error handling and cleaner code.
License:
Mitchell is distributed under the terms of
the GPL. A copy
of this license is provided in the COPYING file of the source distribution.
Current status:
mitchell is currently undergoing a rewrite in a new implementation
language. It's being implemented in SML/NJ
mainly because I enjoy that language and was looking for a reason to get back
into writing in it. The rewrite is up to the semantic analysis phase right
now.
Documentation:
- ChangeLog - The change history for the project
according to version control.
- compiler man page - The man page for
the compiler provides all the documentation for using it. I'm trying
to make it a complete reference to the compiler's command line options
and functionality. This file is automatically generated, so please
forgive any validation errors.
- language grammar - This is a BNF grammar
for the syntax of the language. This is not really helpful to most
people, which is why mitchell will probably never catch on. There are
example programs in the tests directory that are more helpful to the
casual user.
- type rules - This document describes the
rules the compiler uses for type checking the input file, as well as
some notes on what the rules mean and how name scope works.
Releases:
The current release is mitchell preview 5, aimed at people
who just want to see what mitchell is going to look like when it's all done.
Note the current status paragraph above.
Click here for Mitchell releases