terminology - "IS"函数的特定术语

标签 terminology

是否有一个特定的术语来处理返回 bool 值的函数。

例如 getter 和 setter

function GetSomething();
function SetSomething(value);

但是这个呢:

function IsProduction();

它显然是一个更具体的“Getter”,我觉得它应该属于不同的类别。

对于 Google 搜索来说,这显然是一个难题,如果之前有人回答过,我们深表歉意。

最佳答案

Is there a specific term for addressing a function that returns a bool.

由于 bool 只返回 true 或 false,这被称为 Predicate


长话短说

This is obviously a hard question to Google search, so apologies if it's been answered before.

这比 searching 更容易对于名为 .

的谓词

另一个难以搜索的是;。当你解析代码时 ; 实际上可以被认为是连接两个语句的运算符。

关于terminology - "IS"函数的特定术语,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53518406/

相关文章:

linux-kernel - 内核空间和内核栈有什么关系?

algorithm - 是否存在保证启发式方法提供最优解决方案的情况?

terminology - 'Language Construct' 是什么意思?

java - 网络模式与非网络模式的区别

terminology - 验证规则和业务规则有什么区别?

database - 具有公共(public)主键的表

terminology - 什么是 OSGi?它的使用示例有哪些?

java - Java 中的资源、URI、URL、路径和文件有什么区别?

.net - 是引发,触发还是引发事件?