"IS" 函数的特定术语
Specific term for "IS" function
是否有一个特定的术语来处理 returns 布尔值的函数。
例如 Getters 和 Setters
function GetSomething();
function SetSomething(value);
但是这个呢:
function IsProduction();
它显然更具体 "Getter",我觉得它应该属于不同的类别。
这显然是一个很难Google搜索的问题,如果之前有人回答过,我们深表歉意。
Is there a specific term for addressing a function that returns a bool.
因为 bool returns 只有 true 或 false,所以这被称为 Predicate
TL;DR
This is obviously a hard question to Google search, so apologies if it's been answered before.
对于名为 .
的谓词,这比 更容易
另一个很难搜索的是;
。当你解析代码时 ;
实际上可以被认为是一个连接两个语句的运算符。
是否有一个特定的术语来处理 returns 布尔值的函数。
例如 Getters 和 Setters
function GetSomething();
function SetSomething(value);
但是这个呢:
function IsProduction();
它显然更具体 "Getter",我觉得它应该属于不同的类别。
这显然是一个很难Google搜索的问题,如果之前有人回答过,我们深表歉意。
Is there a specific term for addressing a function that returns a bool.
因为 bool returns 只有 true 或 false,所以这被称为 Predicate
TL;DR
This is obviously a hard question to Google search, so apologies if it's been answered before.
对于名为 .
另一个很难搜索的是;
。当你解析代码时 ;
实际上可以被认为是一个连接两个语句的运算符。