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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Optional Parentheses: You're Doing it Wrong

11 点作者 dberube超过 12 年前

2 条评论

jhrobert超过 12 年前
F(x) versus I p -- functional versus imperative, idempotent versus side effect... that's an interesting convention.<p>I believe the mess with optional parentheses is mainly due to the left/righ associative rule. i.e. I have difficulties to properly group subexpressions.<p>My style: don't assume reader knows about associativity rules so much, prefer explicit parentheses when ambiguities about interpretation is solved by these associativity rules.<p>For language designers: maybe parentheses should be mandatory when sufficiently nested?
unobtainium超过 12 年前
:)