Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////////////////////////////////////////////////////////////////
- // About documentation: //
- // //
- // for zig 0.9.0, you can find the reference at //
- // //
- // - https://ziglang.org/documentation/0.9.0/ //
- // //
- // As for stdlib docs, they aren't very good yet, so your best bet is //
- // googling examples and reading the stdlib source. The source is very //
- // easy to read, so this doesn't even matter. Zig ships with the //
- // stdlib's source, which you can find at zig's home directory //
- // /lib/std. Since the language is pretty simple you can also grep for //
- // stuff pretty easily 80% of the time. //
- // //
- // If all else fails you can literally just use C libs, which is what //
- // I do for things like threads (inc. atomic primitives), or system //
- // dependent stuff like syscalls, etc. //
- // //
- // Zig has a much healthier assembly environment than c, because you //
- // have control over everything, including how structures are packed, //
- // calling conventions and function generation (you can even disable //
- // prologues and epilogues), and some other things. //
- // //
- // Zig is a very young language, and it's still changing, so keep that //
- // in mind if you're using a version other than 0.9.0. //
- /////////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////////
- // Who zig is for //
- // //
- // If you are the sort of people who doesn't like C, or enjoys a high //
- // degree of abstraction, Zig is not going to be for you. Zig's core //
- // philosophies are simplicity, and keeping code as transparent as //
- // possible. //
- // //
- // Zig's creator mentions the goal was simply to make "C, but with the //
- // problems fixed", which means you still get most of the freedoms you //
- // get with C, while having the tools to write better code with things //
- // like error handling, namespaces, and so on. With zig, you don't get //
- // any sort of runtime environment or anything like that, it's a systems //
- // programming language. //
- // //
- // Zig has bound checking and stack traces by default to help you debug. //
- // You can turn these off for release by sending the //
- // //
- // $ -Drelease-fast=true //
- // //
- // compiler option. //
- ///////////////////////////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement