You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5615b7c
Browse filesBrowse the repository at this point in the historyBrowse files
Destructuring: rest patterns, { a, ...rest } and [x, ...rest]
An object rest is Solid's `omit` of the named keys, a live view (an
internal `omit` expression in every runner and the crate); an array rest is
`.slice(n)`. In a `let`, an object rest is a copy (`{ ...omit(…) }`).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWP7LmQhib6M9zGnmBH
let pre:Vec<Decl> = names.into_iter().map(|(name, e, line, span)| Decl::Eq{ name, e, line, span,deferred:false,key:None,ty:None,exported:false}).collect();
There is no `let` at the top level or in a component: a value that changes is a `source`, and one computed from
39
39
others is an equation. Bare `x = e` is always an equation and `let x = e` (in imperative code) always a snapshot, as
40
-
in JS; that holds for destructuring too. Mutation is only `:=` and `guess`. Destructuring has no rest (`...r`) yet. Equations are lazy and exact: an arm of `c ? a : b` that isn't taken isn't evaluated.
40
+
in JS; that holds for destructuring too. Mutation is only `:=` and `guess`. A rest, `{ id, ...rest } = props`, is the other fields
41
+
(Solid's `omit`) and keeps updating too. Equations are lazy and exact: an arm of `c ? a : b` that isn't taken isn't evaluated.
0 commit comments