Recent Changes - Search:

yurusanai.de

Design Notes

Things should be as simple as possible -- but no simpler.
-- Albert Einstein

Goals

The basic design goal of the Fishkill language is to keep things as simple as possible, but not so simple that doing useful things becomes impossible. A secondary goal is to not restrict what programmars can do with the language.

Consequences

Lambda expressions can do anything that a regular function can do, including being recursive. This is the rationale behind having a case expression that does the same thing as the guards of multiple definitions of a regular function. This allows a programmer to use a let expression to define local helper functions inside another function.

There are no special cases for data such as integers and strings that could be handled more efficiently by a CPU in their native format. This limits performance, but makes the language more consistent; it also allows programmers to freely manipulate integers and strings.

The single data type design allows programmers to create arbitrary values by just inventing constructor names. There is no need to define data types or allowed constructor names. A single constructor name can have a different number of arguments in different places if the programmer decides that is useful.

A single function name can be defined with a different number of arguments for different definitions. Different definitions do not need to return even remotely similar values. This allows greater flexibility than in strictly typed languages.

All of the standard library of the language is implemented in the language itself.

While the language currently uses strict evaluation, it was designed so that switching to lazy evaluation later should not become a problem.

Shortcomings

The current version of the language makes a distinction between function and non-function values, which is somewhat contrary to the single data type design. This might not be a big problem since one can consider the lambda symbol to be the constructor for functions.

The lack of defined data types makes it easy to shoot oneself in the foot.

The representations of the empty list, the empty string, and the number zero are identical. This makes it impossible to distinguish between them in code or when pretty printing program results.

< Standard Library | HomePage | Examples >

Edit - History - Print - Recent Changes - Search
Page last modified on May 17, 2007, at 12:52 PM