So what if we had a language that depended mostly on keywords (and less on punctuation) that read like the english language?
Something like
let fact of n be
1 if n is 0
n * fact of n otherwise
end
let main be
x = gets
x = fact of x
print x
end
Okay, it looks like crap, but it's just a concept. Ideas /prog/?
Name:
Anonymous2010-11-12 5:15
Pointless verbosity. fact(n) reads "fact of n", but can't you read that aloud while still writing and looking at fact(n)? You are reading * as "by" after all, so why not with some more symbols? Saving typing time and screen state is a good thing, so an English-like programming language is not a great idea. On top of that, you'd have to memorize all sort of insane rules in order to avoid using parens because natural language is naturally bad at that. For example, how would you write (f 1 (f 1 2 (f 1 2 3)) 3) ? "eff of one and eff of one, two and eff of one, two and three, that does it for the last eff, that does it for the last eff, then three, that does it for the last eff"? So simple to understand as an S- or M-expression, so difficult to understand otherwise. There are things that natural language is not for.
For languages like this, refer to COBOL and LOLCODE.