There are Woma Extension and Evaluation Proposals. The name Woma Extension & Evaluation Proposals can be shortened to WEEP or WEEPs. There is a continuous record of WEEP, published in the woma repository under QQ.md. A WEEP should be called WEEP followed by an integer. The integer is one value higher than the last WEEP published.
A new WEEP should also be of the format ## WEEPX 03-Jun-1993 A Title Case Title
Woma is a compiled language targetting CPython extensions and Aspidites is the reference implementation. Woma can be compiled to Python, Cython, or C but generally the Aspidites toolchain works in the following order:
- Woma is compiled to Python and checked for static and bytecode validity. (without parsable cdef and cpdef statements)
- PEP 561 stubs are generated as is py.typed.
- The validated Python is converted to Cython. (cdefs and cpdefs included)
- Cython compiles using the host architecture's compiler and linker.
Every WEEP must be formalized in FORMAL.txt using Attempto Controlled English.
Every WEEP must be formalized in FORMAL.txt using Attempto Controlled English.
Every WEEP will be here from now on.
Woma is a compiled language targetting CPython extensions and Aspidites is the reference implementation. Woma can be compiled to Python, Cython, or C but generally the Aspidites toolchain works in the following order:
- Woma is compiled to Python and checked for static and bytecode validity. (without parsable cdef and cpdef statements)
2. PEP 561 stubs are generated as is py.typed. - py.typed is generated.
- The validated Python is converted to Cython. (cdefs and cpdefs included)
- Cython compiles using the host architecture's compiler and linker.
Trigrams are the preferred way of implementing language, as opposed to standard library, features.
The following symbols are reserved for language features having to do with scope:
<!>
Assigned to enter a context scope<@>
Assigned to enter a loop scope<#>
Unassigned<$>
Unassigned<%>
Unassigned<^>
Assigned to yield to outer scope<&>
Unassigned<*>
Assigned to return to outer scope<_>
Unassigned<+>
Unassigned
The following symbols are reserved for language features having to do with higher-order function manipulation:
(!)
Assigned to match construct(@)
Unassigned(#)
Unassigned($)
Unassigned(%)
Unassigned(^)
Unassigned(&)
Unassigned(*)
Unassigned(+)
Unassigned
Arguments must be specified with a bind variable, a default value, and a contract imposing constraints such as in the following example:
x = 0 -> number
Superseding WEEPs shoud be formatted as in the following example: ## WEEPY 03-Jun-1993 WEEPX SUPERSEDED
. Any textual information from the superseded WEEP should be kept, using strikethrough text to remove superseded text. The title of the superseded weep should be edited by adding "[SUPERSEDED]" to the end.
The (!) trigram is to be used for matching indented cases to the right hand bind variable. These cases should be followed by a colon and the action to be preformed upon a successful match. The entire structure looks like as follows:
(!)bindvar
case1: action1
case2: action2
Similar to WEEP8 but implemented as follows.
bindvar1(!)bindvar2
case1: action1
case2: action2
No arithmetic operation should raise an error. Instead they should be absorbed into nullity. Nullity should be equal and identical to itself but able to carry slotted attributes of the failing operation. The reserved symbol for nullity is the literal /0
.
The following symbols are reserved for language features having to do with collection manipulation:
[!]
Unassigned[@]
Unassigned[#]
Unassigned[$]
Unassigned[%]
Unassigned[^]
Unassigned[&]
Unassigned[*]
Unassigned[_]
Unassigned[+]
Unassigned
There will be an interpreted dialect of Woma, Woma(terse) exclusively for Woma Interactive Shell(WIS) use. The reason for exclusivity is to avoid confusion. In the WIS, the semicolon ;
replaces the indentation normally used.
For functions that take parameters, the parameters must be specified with a (preferably reasonable) default value and a constraining contract.
Function definitions and loops may not be nested.
The match Trigram is limited function calls for each case and will not bind to a variable.
Bitwise operations and arithmetic operators are identical to their Python counterparts with the addition of factorial. Their precedence is as follows:
- !
- **
- +, - (sign operation)
- *, /, //, %
- +, - (addition/subtraction)
- <<, >>
- &
- ^
- |
The following list of comparison operators is supported:
- ==
- <=
- >=
- <
- >
- ||
- &&
- Endeavour to name context managers either when bound using contextmanager or when declared in CamelCase, preferably both.
- Matching is limited to single-letter variables due to bug, the will be maintained as the style until Aspidites 2.0.0 for backwards compatibility.
- Don't add types to names(Hungarian notation).
- Name normal functions using snake_case.
- Keep the line width under 92 characters.