-
Notifications
You must be signed in to change notification settings - Fork 4
Major features
Most programming languages define functions as taking a specific set of inputs and returning a specific set of outputs. A problem occurs when a function can exit in different ways e.g. I/O errors, divide by zeros, etc. Typically this is solved in a couple different ways, one way is using special return codes that signify an error has happened. Another way is by some sort of exception throwing and catching syntax. Mu allows a function to exit in one of multiple exit branches. This allows functions to return in different code paths without packing error codes in to the return value or inspecting an exception type to determine the source of an exceptional circumstance.
Most programming languages have you define a sequence of instructions or a total order; this limits the amount of optimization compilers can perform. Mu syntax is a partial order allowing maximum concurrency all the way from the instruction to the thread level.
Most compilers and toolchains are exposed as a set of command line programs (make, cc, link, etc.). Mu's toolchain is exposed primarily as a code library in addition to command line programs. This cures a lot of string manipulation and platform variance in the build process.
Most programming languages limit the number of things that can be returned from a function to 1 or 0 and if more things are required to be returned, they must either be packed together or other tricks like passing parameters by-reference or dereferencing pointers. Mu allows multiple values to be returned without any extra effort.
Many of the improvements of Mu are smaller evolutionary improvements over existing languages rather than revolutionary new paradigms. Moving to Mu shouldn't require a major change in programming techniques while addressing many of the headaches commonly hit with existing toolchains. The design decisions of Mu are listed on the Design page.