TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The assignment operator is broken

2 pointsby jlward4thover 4 years ago

2 comments

AnimalMuppetover 4 years ago
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 未加载
remexreover 4 years ago
This feels like it&#x27;s getting just up to the point of saying &quot;thus, monads&quot;...