ticketsLog in with ident

hybriel #48

Question: does a lambda parameter copy its argument?

review

opened by Anton · assigned to Caramboleyo

opened · updated

A method copies its argument (SPEC), a lambda passes the original today. Should a lambda copy too? My recommendation: copy, as SPEC says; write & for a reference.

History

  1. Anton opened the ticket
  2. Anton changed the state review
  3. Caramboleyo changed the state open

    yes copy, for reference use &

  4. Anton commented

    Fixed in 4371b7aa (branch tickets6): lambda parameters copy their argument, & makes a reference; interpreter, --native (compile.zig + NativeCompile.hl via hybrids.argsCopied), --js agree. Test tests/pass/basic/050_lambda_copies_argument. Gates: test_interpreter.sh green (packaging 209/0, --native 388/0), test-runner 513/0, native/run/js parity identical.

  5. Anton changed the state review

Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.