Fowl is a programming language that aims to restrict the use of as many code constructs as possible that are prone to leading into code smells.
Fowl is heavily opinionated and purposely does not provide a rich builtin set. It is not focused on performance or giving programmers the freedom to do things their own way. Instead it attempts to impose a uniform way of doing things, so that reading any code written in Fowl is easily understood.
Fowl's primary aims are to
- Eradicate dead code
- Discourage large functions
- Break up complexity
- Ensure the code is stable
- Ensure the code is tested
Fowl is heavily inspired by the work done on the field of refactoring by Martin Fowler, from whom the language's name is inspired.
-
These things don't exist
- Comments
- Switch statement
- Ternary operator
- Global variables
-
Single statement per line, multiple lines per statement
-
All variables and functions declared must be used
-
The cyclomatic complexity of a function must not exceed 10
-
All errors must be handled, unless excplicitly declaring otherwise
-
Every function is accompanied by at least one test, unless explicitly declaring otherwise
-
Variable/function names
- cannot be shorter than 3 letters
- cannot start with 'my' or 'test'
- cannot end with a number or 'new'
- cannot contain '-' or '_'
