# Sema: implement for_len · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/321ccbdc525ab0f5862e42378b962c10ec54e4a1)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 321ccbdc525ab0f5862e42378b962c10ec54e4a1

Requested commit: 321ccbdc525ab0f5862e42378b962c10ec54e4a1

Commit: 321ccbdc525ab0f5862e42378b962c10ec54e4a1

Tree: c3f7ddbd4e78b3aea1905f32c6c314f1933722c2

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Sema: implement for_len

This also makes another breaking change to for loops: in order to
capture a pointer of an element, one must take the address of array
values. This simplifies a lot of things, and makes more sense than how
it was before semantically.

It is still legal to use a for loop on an array value if the
corresponding element capture is byval instead of byref.

```

## Parents

- [5029e5364caccac07f2296c1f30f2f238f13864d](https://git.cafe/gitcafe/zig/commit/5029e5364caccac07f2296c1f30f2f238f13864d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/321ccbdc525ab0f5862e42378b962c10ec54e4a1?format=markdown)
