我知道在 CFScript 中编写代码提示的两种方法。我想知道两者之间是否存在任何功能性、非美学差异,以及什么被认为是最佳实践。
我看到的第一种技术使用函数声明上方的注释来添加提示:
/**
* @hint This function does soemthing
*/
public function foo() {}
而第二种技术将提示合并到声明本身中:
public function foo() hint="This function does something" {}
有理由使用其中一个而不使用另一个吗?如果你有论据来声明你可能想要暗示,你的方法会改变吗?