首页> 外文会议>International Conference on Computer Languages >Combining functional and object-oriented programming methodologies in a large commercial application
【24h】

Combining functional and object-oriented programming methodologies in a large commercial application

机译:将功能和面向对象的编程方法组合在大型商业应用中

获取原文
获取外文期刊封面目录资料

摘要

Functional programming concepts of referential transparency and lazy evaluation combine effectively with object oriented encapsulation. We present a design pattern for C++ classes that are logically immutable and fully determined by the parameters of their constructor. Hidden state is used internally to cache the results of computation performed in the scope of accessors, giving them lazy semantics. Modifying replicators model change by constructing a new instance without changing the original. Previously computed results are lazily copied via a back reference if the parameters upon which the computation depends have not changed. Since these classes are logically immutable they can be freely shared by reference in complex networks, mitigating the amount of actual copying performed. These techniques realize several advantages-well known to the functional programming community-including suitability for modular reasoning and parallel evaluation. 'Undo' facilities and safe recovery from exceptions can be provided with little extra effort. Examples from a large multi platform biomedical imaging application illustrate the techniques.
机译:参考透明度和延迟评估的功能规划概念有效地与面向对象的封装相结合。我们为C ++类呈现了一个设计模式,它是逻辑上的,由构造函数的参数完全决定。隐藏状态在内部使用以缓存在访问器范围内执行的计算结果,给予它们懒惰的语义。通过在不改变原件的情况下构造新实例来修改复制器模型更改。如果计算取决于未改变的参数,则先前计算的结果懒洋洋地通过后引用进行复制。由于这些类在逻辑上是不可变的,它们可以通过参考在复杂网络中自由共享,因此减轻了执行的实际复制量。这些技术实现了功能性编程社区的几个优点 - 包括模块化推理和并行评估的适用性。 “撤消”设施和防止异常的安全恢复可以提供几乎没有额外的努力。来自大型多平台生物医学成像应用的示例说明了技术。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号