方法原型风格澄清
method prototype style clarification
在声明方法原型时,如果参数是什么很明显,那么省略参数名称并只显示类型是可以接受的风格吗?示例:
bool setGender(char);
bool setRomance(int);
bool setName(string);
[..]
double determineGenderFit(DateProfile);
double determineRomanceFit(DateProfile);
double determineFinanceFit(DateProfile);
是的,从函数声明中删除参数名称是可以接受的。尽管包含名称会改善自文档条件,但您的名称反映了对象的实际使用情况。
相关文章:
- Qt VTK交互风格的信号到小部件
- 函数向量_指针有不同的原型,我可以构建一个吗
- 我可以使用条件运算符初始化C风格的字符串文字吗
- Visual Studio 2019:插入多个C++风格的单行注释
- 如何在本地机器上运行c++和javascript客户端代码(hackerbank风格)
- 功能原型的目的
- getline() 的原型/库是什么;
- 具有enable_if外部类原型的模板类构造函数定义
- 函数如何通知用户它基于函数原型抛出异常?
- 在C++中包含原型文件的正确方法是什么?
- 在函数中拥有函数原型的目的是什么?
- 什么..(省略号)作为函数原型中唯一的函数参数,C++?
- 重载运算符<<采用谷歌 C++ 风格
- C++许多 SFINAE 风格的过载
- 是否可以使用 libclang python 解析 cpp 文件中没有标头的函数原型
- 如果原型是本地的,则使用流 I/O C++类型约束将失败
- 如何进行原型消息交叉引用?
- 谷歌风格指南(前向分枝部分)
- 方法原型风格澄清
- c++ JSON序列化,原型风格