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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: Cheatcode.io, a Swift syntax reference

9 点作者 paulshen超过 10 年前

1 comment

jiaaro超过 10 年前
Searches for unfamiliar special characters should work. Single-character operators and syntactic sugar are one of the harder things to google for, and consequently, a big advantage of a purpose made language reference tool like you&#x27;ve made.<p><i></i>A simple solution:<i></i><p><pre><code> ? -&gt; Optionals ?? -&gt; nil coalescing ! -&gt; Implicitly Unwrapped Optionals &lt;&gt; -&gt; Generics as? -&gt; type casting </code></pre> …and so on<p><i></i>A Better solution:<i></i><p>provide a wikipedia-like disambiguation section for special characters (since `!` could be Implicitly unwrapped optionals, Forced unwrapping, or boolean negation)
评论 #8524588 未加载