I have always dreamed of a completely readable language. Not because it'd be "easier" to code with, no, it'd be much harder. I just always thought it'd be pretty cool. Here's an example of my "dream language":
Code: Select all
(this is a variable declaration and an if statement.
oh and this is a multi-lined comment.
There is no single lined comment, you always need to close the parentheses.)
variable name is equal to true
if name equals true, out "hi", if not, out "bye".
(this is obviously bunched up in one line and could be whitespaced/newlined as much as needed)
(analysis:
creating a variable called name, and setting it to true. Then, we check if name is equal to true, and then we output hi if yes. Else, we output bye.)
(basic syntax translating:
"variable" is a variable declaration
"is equal to" just means =
"equals" is ==
"," is then, or its a continuation, depending on where the last "," was.
"out" is print
"if not" is an else statement
"." usually means closing a statement)
Funny thing, I once tried to hard-code a simple language with Java, using this syntax. I somewhat succeeded, I created a "language" that could assign a variable a name and a number, and then you could print that. It's all it did, but it was interesting.
And you? What would be your dream syntax if you could create a programming language?