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.

Trends in modern programming language syntax

14 pointsby johndcookabout 12 years ago

3 comments

olalondeabout 12 years ago
&#62; CoffeeScript makes parentheses optional in many cases (as does Ruby)<p>This is one thing that really annoys me with Coffeescript. I personally find the lack of parentheses makes the code harder to read (since it's sometimes ambiguous where the parentheses should be) but faster to write.<p>&#62; An important consequence of this is implicit returns: because every construct must return a value, all functions must return a value, whether return is called explicitly or not.<p>Same concern here. When working with someone else's code, it is sometimes unclear if the author intended the last expression to be the return value or it just happened to be the last line of code and it is safe to return something else.<p>The lack of parentheses and implicit returns also makes it hard to maintain a consistent code style guide as there are too many ways of writing the same thing.
评论 #5724683 未加载
评论 #5725626 未加载
k__about 12 years ago
Does "return unless x is 5" really do what I read?<p>return unless x is 5<p>"reads" like<p>if( x !== 5 ) return;<p>but I guess it's more like<p>return (x !== 5);
评论 #5724481 未加载
评论 #5724466 未加载
sodiumphosphateabout 12 years ago
I wish someone would write a CoffeeScript for C++.
评论 #5724549 未加载
评论 #5724804 未加载