作为Lips的一种变体,Clojure的优势之一就是代码即数据(也称为同像(homoiconicity))。
One of the benefits of Clojure as a Lisp variant is that code is data (also known as homoiconicity).
这意味着编写适用于基本条件的代码,即所有的数据都是可用的,所有的条件符合预期。
This means writing code that works well for the basic conditions, when all the data is valid and all the conditions are as expected.
性能比较使用与之前文章相同的测试代码,即地震数据查询服务。
The performance comparisons use the same test code as earlier articles, a seismic data retrieval service.
由于这是一个松散耦合的场景,您必须假定客户机并不清楚服务配置文件(即清单1中的代码)中包含了多少XML数据项。
Because this is a loosely coupled scenario, you must assume that the client doesn't know how many XML data items are contained in the service profile (that is, the code in Listing 1).
重要的是该工作区不同于执行开发的工作区(即包含源代码项目的工作区),因为后者可能会导致数据破坏。
It is important that this workspace not be the same as the one in which development is performed (the one that contains your source code projects) because that situation could cause data corruption.
那起了作用,但却产生了额外的代价,即部分多余的代码且需要花更多的时间处理数据。
That worked, but the cost was additional, partially redundant code and more time to process the data.
清单5中的代码(通常用代码生成工具生成)展示了一个skeleton,它使用XMLBeans生成的类(即PurchaseOrderDocument)进行数据绑定。
The code in Listing 5 (typically generated by a code generation tool) shows a skeleton that USES XMLBeans generated classes, meaning a PurchaseOrderDocument for data binding.
清单5中的代码(通常用代码生成工具生成)展示了一个skeleton,它使用XMLBeans生成的类(即PurchaseOrderDocument)进行数据绑定。
The code in Listing 5 (typically generated by a code generation tool) shows a skeleton that USES XMLBeans generated classes, meaning a PurchaseOrderDocument for data binding.
应用推荐