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 [...]
If - then - else 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:

Factorial:

Example for versions W 0.0.1
Repeat 15
[
	Item x = 1
	Repeat #
	[
		x = x * #
	]
	Type(x)
]

Hello, World!:

Example for versions W 1.1.0
REF "Runtime.IO"
Type("Hello, World!")

Fibonacci numbers:

Example for versions W 1.1.0
REF "Runtime.IO"

Item x = 1
Item y = 1

Type(x)
Repeat 15
[
	Type(y)
	Item z = x + y
	x = y
	y = z
]