TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The assignment operator is broken

2 点作者 jlward4th超过 4 年前

2 条评论

AnimalMuppet超过 4 年前
I deny that the example given counts as &quot;broken&quot;. The expectation seems to be that, if a variable was created as the result of a function call with side effects, <i>every</i> use of that variable on the right-hand-side of an equals will result in an additional function call, with side effects. I suppose that that&#x27;s mathematical equality, as defined in math papers, but we aren&#x27;t writing math papers. Programmers would find that behavior to be <i>much</i> less useful than the current one.<p>[Edit: I mean, I guess that the proposed approach allows &quot;algebraic reasoning&quot;, which some people find helpful...]
评论 #24732367 未加载
remexre超过 4 年前
This feels like it&#x27;s getting just up to the point of saying &quot;thus, monads&quot;...