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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Cheat sheet for Scala syntax

3 点作者 r11t超过 15 年前

1 comment

donw超过 15 年前
I'm bookmarking this because it's interesting, and potentially useful, but it highlights one of things I really, really don't like about Scala. Namely, like C++, it feels like the Scala authors put absolutely everything in, along with a few bags of syntactic sugar.<p>Import renaming, lazy evaluation for function arguments, and variables for closures all use the exact same syntax. The glob operator for imports (_) is different than it is pretty much anywhere else, and it means something different in the context of an iterator.<p>I like static typing with type inference, and syntactic sugar for common operations. But Scala takes the latter way too far, and IMHO it drifts off to unreadability pretty quickly, especially because it introduces a lot of uncommon conventions for common tasks.