satyr/coco

object slice

satyr opened this issue · 0 comments

o.{a:b, c}{a: o.b, c: o.c}

This will:

  • enable partial copy/import, e.g. import Array::{push, forEach}.
  • mirror array slice (a[x, y][a[x], a[y]]) and object subdestructuring (p{a:b, c} = q{a: p.b, c: p.c} = q), improving semantic consistency.

For applying ADI (o{a}; o?{b}o.{a}; o?.{b}), the clone syntax (p = Point{x: 7, y: 8}) needs to change; probably to unary ^ (p = ^Point <<< x: 7, y: 8).