Nimrod is a new imperative (would say normal) although with some Object Oriented programming language.
It compile the relatively high-levvel to C to make supposedly easily distributable executable.
One of the think that seems most interesting is a lot of libraries (GTK, SDL, etc) standardly distributed in the distribution.
So, no special “link with that library” options needed, and so on Linux or Windows.
Compiling your GTK + SDL is as simple as:
nimrod c -r myprogram.nim
(compile then run myprogram)
Syntax use indentation to make code quite readable.
Use modules, so you just import SDL and GTK modules at the begin of your programs.
Threads are there, but seems to be a bit evolving yet… with an actor model.
I’ll never understand why people think that removing symbols such as “(”, “)”, “;”, “{”, “}” makes the programming language easier. It just makes is messier and illogical.
[code]var count = 0;
var sum = 0;
for (line in stdin.lines)
{
count += 1;
sum += line.len;
}
echo "Average line length: ",
if (count > 0) : sum / count else: 0;[/code] Some minor changes but it makes it look a lot more logical at first glance doesn’t it? It’s no less high level than their original example.
since end-of-line acts as ; in VB.NET you had to append _ to the end of the line to tell the interpreter that the code continues on the next line. really retarded.