3 ms·
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 s
by pathsjs 10y ago
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)
- gravypod 10y agoThat was the first code snippet on the website that I saw.