StackOverflow有很多有趣的问答, 其中有一些问答汇集了很多人的智慧。 其中Hidden features of系列揭示了一些语言的隐藏特性,非常的有趣, 比如Java中:
- Set<String> fruits = new HashSet<String>() { {
- add("苹果");
- add("香蕉");
- add("梨");
- add("芒果");
- } };
尽管这些问答很早(自08年开始)就开始收集整理了,但是很多的答案都出人意料,并且你在教科书中是不会看到这些技巧的。
以下列出了投票***的一些语言和工具的隐藏特性。
Hidden Features of C#?
Hidden features of Python
Hidden Features of Java
Hidden Features of JavaScript?
Hidden features of Ruby
Hidden features of Scala
Hidden Features of ASP.NET
Hidden features of Perl?
Hidden features of C
Hidden features of HTML
Hidden Features of SQL Server
Hidden Features of C++?
Hidden features of Bash
Hidden features of Android development?
Hidden Features of Xcode
Hidden features of HTTP
Hidden features of Groovy?
Hidden Features of Xcode 4
Hidden Features of PHP?
Hidden Features IntelliJ IDEA
Hidden features of CSS
Hidden Features of Erlang
Hidden features of Windows batch files
Hidden features of Clojure
Hidden Features of MySQL