News for hackers. Stuff that matters.
Re:Nim Programming Language v0.16.0 released by pathsjs on Monday January 09, 2017 @10:36AM (#13357035)
Well, the example you are looking at is very complex, but also you are very unlikely to run into it early! For better examples, look at the homepage: you will see something much more approachable.

The reason this snippet is complex is that:

1. It deals with the Foreign Function Interface

2. It deals with the FFI with respect to C++, which is much more complex than the one towards C, essentially because C++ itself is complex

3. It uses a particular construct (emit) that is only needed when the standard FFI is not enough

So the example is really a showcase of a particularly complex case that you will likely not encounter, unless you start wrapping C++ libraries (which is not an easy task, unlike the C ones)

Re:Nim Programming Language v0.16.0 released by gravypod on Tuesday January 10, 2017 @03:22PM (#13368602)
That was the first code snippet on the website that I saw.