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.

Optional Parentheses: You're Doing it Wrong

11 pointsby dberubeover 12 years ago

2 comments

jhrobertover 12 years ago
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?
unobtainiumover 12 years ago
:)