Array and slice address relationship

There was a useful article on the now defunct zig.news about how many-item types are related. The synopsis is this image:


I think it’s now incomplete because there are some more conversions possible (like from array to slice with &). But maybe this helps a bit with understanding the differences.

You can kind of read the article here in the dump. Search for “In the Zig language, when working with a sequence of” if the link isn’t working.

5 Likes