q****x 发帖数: 7404 | 1 C++:
void foo(const char* fname, const char* mname, const char* lname);
Obj C
- (void)first:(NSString *)fname second:(NSString *)mname third:(NSString )
lname;
So the function name and the 1st parameter name are identical? This really
looks weird. What's the rationale behind this design? It's count-intuitive
that changing the 1st parameter name means changing the function name. |
c*******9 发帖数: 9032 | 2 “1st parameter name”其实是function的一部分,不要分割看。
intuitive
【在 q****x 的大作中提到】 : C++: : void foo(const char* fname, const char* mname, const char* lname); : Obj C : - (void)first:(NSString *)fname second:(NSString *)mname third:(NSString ) : lname; : So the function name and the 1st parameter name are identical? This really : looks weird. What's the rationale behind this design? It's count-intuitive : that changing the 1st parameter name means changing the function name.
|
g*******t 发帖数: 7704 | 3 first 是函数名,second没什么用,仅仅是便于阅读, |
c***k 发帖数: 1589 | 4 second is also part of the function name. the real name is actually "first:
second:third:"
【在 g*******t 的大作中提到】 : first 是函数名,second没什么用,仅仅是便于阅读,
|