W

Appeared in:
2013
Influenced by:
Typing discipline:
File extensions:
.w
Versions and implementations (Collapse all | Expand all):
Programming language

The W Programming Language is a simple programming language designed for speed of writing and readability.

W was conceived in 2013 by Weston Sleeman after being frustrated by the complexity, overhead, and repetitiveness of most common languages, notably C and Java.

Elements of syntax:

Inline comments ?
Non-nestable comments { ... }
Case-sensitivity no
Variable assignment variable = value
Variable declaration item variable
Variable declaration with assignment item variable = value
Block [...]
Physical (shallow) equality =
Comparison = < >
If - then if condition [...]
Loop forever repeat [...]
For each value in a numeric range, 1 increment repeat x [... x = x + 1 ...]
For each value in a numeric range, 1 decrement repeat x [... x = x - 1 ...]

Examples:

Hello, World!:

Example for versions W 0.0.1
Type "Hello, World!"

Factorial:

Example for versions W 0.0.1
item x
x = 1
item y
item z
Repeat 15 [
     y = 0
     z = 0
     repeat x [
          y = y + x - z
          z = z + 1
     ]
     type y
     x = x + 1
]