This is alüla, the language that does away with the semicolon, but embraces the colon. alüla is a static, strongly typed programming languages that focuses on parallelism and simplicity through the standardized use of the colon. alüla takes inspiration from Python and Elm.
In many programming language, the equal sign has many contextual uses. For example, in JavaScript, a single equal sign (=) is used to declare, while a double or triple equal sign (==/===) is for different types of comparisons. The overuse of such a character can cause unnecessary confusion for beginner coders. In alüla, the equal sign is utilized, but only for the comparison of values. All declarations, statements, and function calls begin with a colon, allowing for an easier understanding for those unfamiliar with the language. In Layman's terms, anything that does something or is usable begins with a colon.
print: "Hello World"
Finds the average of a list of numbers
function average: num list {
num multiplied: 1
for: i:0, i < (list -> length), i++ {
multiplied : list[i]
}
return multiplied / (list -> length)
}
Iteratively finds fibonacci number at the nth index value
function fibonacci: num position {
num result: 1
for: i: 1, i < (position -> length), i++ {
result +: result
}
return: result
}
Returns odd or even based on the input
function oddOrEven: num number {
if: number % 2 == 0 {
return: 'even'
} else:
return: 'odd'
}
A basic closure that finds the previous x value and multiplies it by y
function closure: num x, num y {
currentX: x
return: function next: {
currentX: currentX y
return: currentX
}
}
closureVariable: closure: 3, 2
closureVariable -> next