arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2104.00379cs.PL
收藏

Ruby中的不变性和设计模式

Immutability and Design Patterns in Ruby

Seamus Brady

摘要:

函数式编程在过去的几年里重新受到人们的关注,并且经常被提到与面向对象编程相反。然而,面向对象编程实际上可以吸收函数式编程的一些教训,以提高性能和可靠性。本文探讨了三种方法,其中不可变性,一种常见的函数式编程技术,可以用来开发Ruby中的不可变对象。

英文摘要:

Functional Programming has seen a resurgence in interest in the last few years and is often mentioned in opposition to Object-Orientated Programming. However, Object-Orientated Programming can actually absorb some of the lessons of Functional Programming to improve performance and reliability. This paper examines three ways in which Immutability, a common Functional Programming technique, can be used to develop immutable objects in Ruby.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑