google / starlark-go

Starlark in Go: the Starlark configuration language, implemented in Go
BSD 3-Clause "New" or "Revised" License
2.26k stars 204 forks source link

Pass by value, or pass by reference? #485

Closed HiPhiXi closed 11 months ago

HiPhiXi commented 11 months ago

Any detailed explaination about this on Starlark?

adonovan commented 11 months ago

See https://github.com/google/starlark-go/blob/master/doc/spec.md#identity-and-mutation. It works similarly to Python.