Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
askmrsinh
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
askmrsinh
1y ago
Constants are useful for reasoning about code, but anyone who focuses only on making everything an immutable is missing the point. The main goal should be achieving referential transparancy. It can be perfectly fine to use mutable variables
2.
▲
by
askmrsinh
1y ago
Why not do: const y = x ? true : false;