Advertisement
Guest User

Untitled

a guest
Feb 9th, 2022
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 3.56 KB | None | 0 0
  1.  
  2. /////////////////////////////////////////////////////////////////////////
  3. // About documentation:                                                //
  4. //                                                                     //
  5. // for zig 0.9.0, you can find the reference at                        //
  6. //                                                                     //
  7. //  - https://ziglang.org/documentation/0.9.0/                         //
  8. //                                                                     //
  9. // As for stdlib docs, they aren't very good yet, so your best bet is  //
  10. // googling examples and reading the stdlib source. The source is very //
  11. // easy to read, so this doesn't even matter. Zig ships with the       //
  12. // stdlib's source, which you can find at zig's home directory         //
  13. // /lib/std. Since the language is pretty simple you can also grep for //
  14. // stuff pretty easily 80% of the time.                                //
  15. //                                                                     //
  16. // If all else fails you can literally just use C libs, which is what  //
  17. // I do for things like threads (inc. atomic primitives), or system    //
  18. // dependent stuff like syscalls, etc.                                 //
  19. //                                                                     //
  20. // Zig has a much healthier assembly environment than c, because you   //
  21. // have control over everything, including how structures are packed,  //
  22. // calling conventions and function generation (you can even disable   //
  23. // prologues and epilogues), and some other things.                    //
  24. //                                                                     //
  25. // Zig is a very young language, and it's still changing, so keep that //
  26. // in mind if you're using a version other than 0.9.0.                 //
  27. /////////////////////////////////////////////////////////////////////////
  28.  
  29.  
  30. ///////////////////////////////////////////////////////////////////////////
  31. // Who zig is for                                                        //
  32. //                                                                       //
  33. // If you are the sort of people who doesn't like C, or enjoys a high    //
  34. // degree of abstraction, Zig is not going to be for you. Zig's core     //
  35. // philosophies are simplicity, and keeping code as transparent as       //
  36. // possible.                                                             //
  37. //                                                                       //
  38. // Zig's creator mentions the goal was simply to make "C, but with the   //
  39. // problems fixed", which means you still get most of the freedoms you   //
  40. // get with C, while having the tools to write better code with things   //
  41. // like error handling, namespaces, and so on. With zig, you don't get   //
  42. // any sort of runtime environment or anything like that, it's a systems //
  43. // programming language.                                                 //
  44. //                                                                       //
  45. // Zig has bound checking and stack traces by default to help you debug. //
  46. // You can turn these off for release by sending the                     //
  47. //                                                                       //
  48. // $ -Drelease-fast=true                                                 //
  49. //                                                                       //
  50. // compiler option.                                                      //
  51. ///////////////////////////////////////////////////////////////////////////
  52.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement