Abstract
C++ permits definition of a local class, within a function, method or block rather than in the global space. This feature makes nested functions and closures possible. Returning an object as the result of a function inevitably involves deep-copying of the object to and from temporaries, which may be expensive for big objects. Lazy construction, a late binding, is a simple and a very useful alternative. In this method, matrices themselves are never returned from functions; a function may however yield a recipe for how to make an object. In a code snippet, the first argument is the title of a test case and the second argument is a test's body itself, specified as an anonymous function, a genuine abstraction.
Original language | English |
---|---|
Title of host publication | Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP |
Publisher | Association for Computing Machinery |
Pages | 337 |
Number of pages | 1 |
Publication status | Published - 1998 |
Externally published | Yes |
Event | Proceedings of the 1998 3rd ACM SIGPLAN International Conference on Functional Programming, ICFP-98 - Baltimore, MD, USA Duration: 1998 Sep 27 → 1998 Sep 29 |
Other
Other | Proceedings of the 1998 3rd ACM SIGPLAN International Conference on Functional Programming, ICFP-98 |
---|---|
City | Baltimore, MD, USA |
Period | 98/9/27 → 98/9/29 |
ASJC Scopus subject areas
- Computer Science(all)