Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在一些演示代码中发现,两者*x都x*使用。有时,星号也用于类型,例如*int xs. 在帮助中,仅Var*记录了模式。将星号放在模式变量之前或之后有什么区别吗?
*x
x*
*int xs
Var*
好问题。答案是肯定的和否定的:
*
因此,请尽可能使用前缀+和前缀*,以避免将来我们从语言中删除后缀*时升级痛苦。+
+