Skip to content

Releases: pedropark99/zig-book

v0.4.2

12 Aug 02:18
77dc10f
Compare
Choose a tag to compare

What's Changed

  • Add a section to explain why function arguments in Zig are immutable by @pedropark99 in #24
  • Also relate the knowledge discussed in this new section to the content discussed at the section about struct state.

Full Changelog: v0.4.1...v0.4.2

v0.4.1

11 Aug 18:42
a17bba3
Compare
Choose a tag to compare

When we declare methods inside a struct object in our Zig source code, in some specific cases we have to use a "pointer to struct" in the self argument of our struct object, instead of using "copy to struct" in this self argument. In other words, in some specific cases, we have to pass the struct object by reference, and not by value, to the method. This affects only the self argument in methods of struct objects.

So, if you have a struct named User, and you declare a method inside this struct, a method of this struct might need to use self: *User in it's arguments, instead of the usual self: User.

In this release, we added a section to the book to explain this type of situations, and why we would use self: *x instead of self: x on struct methods.

What's Changed

  • Remove format specifier that doesn't exist in Zig at the debugging chapter.
  • Add section to explain the difference between self: x and self: *x by @pedropark99 in #22

Full Changelog: v0.4.0...v0.4.1

v0.4.0

10 Aug 14:48
282a024
Compare
Choose a tag to compare

This is a big release that introduces two new chapters to the book that are related to Data Structures, Comptime and Generics in Zig.

What's Changed

  • Add chapter that explains which Data Structures are avaialable in the Zig Standard Library, and demonstrate how to use them, by @pedropark99 in #20
  • Add chapter that explains of the key features of Zig, which is comptime, and explains how this feature is used to implement generics in Zig.
  • One of the new chapters is also a chapter that uses a small project to demonstrate these concepts in practice.

Full Changelog: v0.3.8...v0.4.0

v0.3.8

01 Aug 02:40
a1c64c0
Compare
Choose a tag to compare

What's Changed

Related to #7 .

This release Zig is not memory safe by default. But it is a language that offers a lot of tools to be memory safe.
This PR adds a section that lists the features that Zig offers to achieve safety in our software. In other words, this section
describes how Zig faces the "safety problem" in modern software.

By @pedropark99 in #18

Full Changelog: v0.3.7...v0.3.8

v0.3.7

31 Jul 22:59
b76d266
Compare
Choose a tag to compare

What's Changed

  • Move structs to a separate chapter.
  • Also add a section to explain the relationship between modules and structs.

By @pedropark99 in #17

Full Changelog: v0.3.6...v0.3.7

v0.3.6

31 Jul 00:06
b9e5d69
Compare
Choose a tag to compare

What's Changed

The following changes were made by @pedropark99 at #16 :

  • Adds a small section to explain clearly what the keyword defer means in Zig code.
  • Adds some cross-references in the book.
  • Explain a bit further the key differences between defer and errdefer.

Full Changelog: v0.3.5...v0.3.6

v0.3.5

30 Jul 20:58
38b4008
Compare
Choose a tag to compare

What's Changed

This new relase publishs a new chapter for the book. In this new chapter we discuss how to handle errors and also, how to create union types in Zig, by @pedropark99 in #15

Full Changelog: v0.3.0...v0.3.5

v0.3.0

28 Jul 14:32
4df2986
Compare
Choose a tag to compare

This realease marks the first public release of the book. But there is, still, a lot to be done to reach version v1.0 (which marks the first edition) of the book. Now, let's discuss what has changed in this first public release.

What's Changed

  • Thanks to @esskayesss for pointing out my mistakes at #8 , we now have applied fixes over Figure 3.1 about the base64 encoder by @pedropark99 in #10

Full Changelog: https://github.com/pedropark99/zig-book/commits/v0.3.0