去年在实习的时候,看电子版的《OReilly.Java.Enterprise.in.a.Nutshell.3rd.Edition.Nov.2005》时,对于其中讲hibernate的类映射(Class Mappings)问题的时候,提及的一个概念,first-class,迷惑不解。科班的教育根本没有向我提及这个词在计算机科学里的意义,纯粹的字面解释让人在上下文的语境中真的有点摸不清什么意思。
So far, we've been working with what Hibernate calls "first-class" objects.
其实这篇日志早已在去年8月16日写下,不过是在其他地方,现在觉得有必要转过来。
下面的这个解释是别人查wikipedia然后留在blog上的,借用下来,看了之后应该再不晕了吧。
First-class object
In computing, a first-class object (also -value, -entity, -citizen), in the context of a particular programming language, is an entity which can be used in programs without restriction (when compared to other kinds of objects in the same language). Depending on the language, this can imply:
being expressible as an anonymous literal value
being storable in variables
being storable in data structures
having an intrinsic identity (independent of any given name)
being comparable for equality with other entities
being passable as a parameter to a procedure/function
being returnable as the result of a procedure/function
being constructable at runtime
For example, in C, it is not possible to create new functions at runtime, whereas other kinds of object can be created at runtime. So functions in C are not first-class objects; sometimes they are called second-class objects because they can still be manipulated in most of the above fashions (via function pointers). Similarly, strings are not first class objects in FORTRAN 66 as it is not possible to assign them to variables, whereas numbers can be so assigned.
————————————————————————————————
First-class function
In computer science, a programming language is said to support first-class functions if it treats functions as first-class objects. Specifically, this means that functions can be created during the execution of a program, stored in data structures, passed as arguments to other functions, and returned as the values of other functions.
分享到:
相关推荐
一篇很好的极少怎么写SCI论文的文章
Languages such as Scheme and Smalltalk that provide continuations as first-class data objects present a challenge to efficient implementation.
Mfirst-in-classM Optimizer 智能系统获FDA批准.pdf
“first-in-class” Optimizer智能系统用于心力衰竭的治疗.pdf
学习架构师课程,不是想当然的就能行的,必须要有很好的基础才能实现。该文档讲述了一个架构师成长之路。
(1)参数row-class-name无效的坑:官方文档给出了如下代码: 但是我使用后并没有出现预初想要第一行高亮的效果,然后console.log(row, rowIndex),发现控制台输出的值均为undefined。最终解决方案是只要传入...
java-first-class-encapsulation 该项目显示了封装如何在Java中工作以及如何使用它。
一流的项目我首先通过将通用的地方样式放置到父样式中来简化css,以便将其应用于所有元素。然后我继续将hmtl的某些方面正确命名为正确的格式,例如我们的页眉页脚和导航栏
一流的功能学习目标定义“一流的功能” 使用内联函数使用函数作为返回值介绍在生活中的某些时候,我们需要迈出第一步。 由于生活的脚本编写不像真人秀一样,因此在第一步之后一切都可能发生。 我们需要能够进行相应...
一流的功能学习目标练习编写内联函数练习编写用作回调的函数解释什么是“一流的功能”介绍在生活中的某些时候,我们需要迈出第一步。 由于生活的脚本编写不像真人秀一样,因此在第一步之后一切都可能发生。...
确保运行测试以了解本实验室要求您解决的问题类型。 您将编写六个函数: logDriverNames() —接收driver对象数组,并将每个driver的name属性记录到控制台。 logDriversByHometown() —接收driver对象数组作为第一...
中国双一流大学视觉形象识别系统网址集合Visual Identity System of Chinese Double First-Class University websites视觉形象识别系统(Visual Identity System of Chinese University, VIS) 是由代表学校视觉形象的...
一流的功能实验室目标调用分配给变量的函数。 调用存储在数据结构中的函数。 编写返回其他功能的功能。 将一个函数传递给另一个函数。 调用另一个函数返回的函数。介绍函数是JavaScript的重要组成部分,您将一直使用...
JavaScript函数作为头等数据:函数数组 学习目标 创建一个遍历函数ArrayJavaScript函数 介绍 由于JavaScript中的函数是“一流”对象,因此意味着可以将它们像JavaScript中的任何其他数据类型一样对待( Number , ...
JavaScript用作一流数据:行为 学习目标 创建由事件触发JavaScript函数 介绍 在JavaScript中,函数是所谓的“”。 这意味着可以像对待其他任何变量一样对待它们:可以将它们分配给变量,存储在数据结构中,作为参数...
有关更多信息,请参见关于的部分。 npm run build 将用于生产的应用程序构建到build文件夹。 它在生产模式下正确地捆绑了 React 并优化了构建以获得最佳性能。 构建被缩小,文件名包括哈希值。 您的应用程序已...
JavaScript函数作为头等数据:函数数组学习目标创建一个遍历函数ArrayJavaScript函数介绍由于JavaScript中的函数是“一流”对象,因此意味着可以将它们像JavaScript中的任何其他数据类型一样对待( Number , String...
npx create-next-app --example active-class-name active-class-name-app # or yarn create next-app --example active-class-name active-class-name-app 手动下载 下载示例: curl ...
FirstHello.class