top | item 46760259 (no title) rvba | 1 month ago > In herd, everything is immutable unless declared with varSo basucally everything is var? discuss order hn newest jcparkyn|1 month ago I'm not sure if I understand the question?There are two ways to define a variable binding: x = 1; // declares x as immutable var y = 2; // declares y as mutable The "default" behaviour (if no keyword is used) is to define a new immutable variable. rvba|1 month ago I'm asking if the reality wouldn't be that "everything" is set as mutable by default and the non mutable part is ignored. load replies (1)
jcparkyn|1 month ago I'm not sure if I understand the question?There are two ways to define a variable binding: x = 1; // declares x as immutable var y = 2; // declares y as mutable The "default" behaviour (if no keyword is used) is to define a new immutable variable. rvba|1 month ago I'm asking if the reality wouldn't be that "everything" is set as mutable by default and the non mutable part is ignored. load replies (1)
rvba|1 month ago I'm asking if the reality wouldn't be that "everything" is set as mutable by default and the non mutable part is ignored. load replies (1)
jcparkyn|1 month ago
There are two ways to define a variable binding:
The "default" behaviour (if no keyword is used) is to define a new immutable variable.rvba|1 month ago