c# - LINQ:为什么叫 "Comprehension Syntax"

标签 c# linq syntax naming

为什么是following LINQ syntax (有时称为“查询”语法)称为“理解”语法?理解了什么(肯定是错误的)?或者,全面代表了什么(也许我现在走对了路)?

最佳答案

它来自与语言无关的术语 List Comprehension许多语言都遵循。历史显然是:

The SETL programming language (later 1960s) had a set formation construct, and the computer algebra system AXIOM (1973) has a similar construct that processes streams, but the first use of the term "comprehension" for such constructs was in Rod Burstall and John Darlington's description of their functional programming language NPL from 1977.

FOLDOC大多数也回应了这一点:

According to a note by Rishiyur Nikhil , (August 1992), the term itself seems to have been coined by Phil Wadler circa 1983-5, although the programming construct itself goes back much further (most likely Jack Schwartz and the SETL language).

The term "list comprehension" appears in the references below.

The earliest reference to the notation is in Rod Burstall and John Darlington's description of their language, NPL.

["The OL Manual" Philip Wadler, Quentin Miller and Martin Raskovsky, probably 1983-1985].

["How to Replace Failure by a List of Successes" FPCA September 1985, Nancy, France, pp. 113-146].

关于c# - LINQ:为什么叫 "Comprehension Syntax",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6229187/

相关文章:

c# - 如何使用c#使用 'POST'方法获取JSON数据?

c# - 如何获取触发器以根据 DataContext 属性更改 TextBlock 的颜色?

C# 属性命名事件

c# - 如何找到我的多人游戏的主机 IP

c# - LINQ:按升序对记录进行排序,最后为 NULL 值

c# - 删除最大值

linq - TransactionScope、linq 和奇怪的事务管理器问题(HRESULT : 0x8004D024)

具有关联值和函数比较的 Swift 3 枚举

java - "=?"在 SQL 查询中使用时代表什么

ruby - Ruby 中允许 "p *1..10"打印出数字 1-10 的功能是什么?