The Qu Programming Language 1.01 (Default)
来自http://www.freshmeat.net
好像比较有趣,程序比较小,还没有时间看。据作者说性能不错:
"All I can tell you is that on my Pentium(R) 4 CPU 1.70GHz
with 256 KB Cache and 256 MB RAM running Linux 2.4 and KDE-2,
Qu is generally faster than Perl-5.6, Python-2.3 and Ruby-1.8.
It is significantly slower than C, of course."
支持Exception和OO,比较有趣的是Exception的处理,下面是它给出的例子:
hello
sub hello (msg = nil)
```
Prints a message for the world.
```
local head = false
do try
msg is Str or throw EArgType, "me want string"
msg.('len') or throw EArgValue
print (msg.ufirst)
head = true
catch EArg
msg = `hello`
redo /* 就是这里,呵呵,还可以redo,有趣。 */
finally
assert (head is true, "eh?")
/*
Lets do this right
*/
println (' World!')
;;
;;