VerticalNews VerticalNews
VerticalNews VerticalNews VerticalNews VerticalNews     VerticalNews VerticalNews


Encyk Ad
Advertisement
VerticalNews
Computers Topics
VerticalNews
VerticalNews
VerticalNews
VerticalNews
VerticalNews
VerticalNews

Computers


Computer Programming - Findings in computer programming reported from Texas A&M University

  2010 AUG 26 - (VerticalNews.com) -- "A style of programming that uses higher-order functions has become common in C++, following the introduction of the Standard Template Library (STL) into the standard library. In addition to their utility as arguments to STL algorithms, function parameters are useful as callbacks on GUI events, defining tasks to be executed in a thread, and so forth," researchers in the United States report.

  "C++'s mechanisms for defining functions or function objects are, however, rather verbose, and they often force the function's definition to be placed far from its use. As a result, C++ frustrates programmers in taking full advantage of its own standard libraries. The effective use of modern C++ libraries calls for a concise mechanism for defining small one-off functions in the language, a need that can be fulfilled with lambda expressions. This paper describes a design and implementation of language support for lambda expressions in C++. C++'s compilation model, where activation records are maintained in a stack, and the lack of automatic object lifetime management make safe lambda functions and closures challenging: if a closure outlives its scope of definition, references stored in a closure dangle. Our design is careful to balance between conciseness of syntax and explicit annotations to guarantee safety. The presented design is included in the draft specification of the forthcoming major revision of the ISO C++ standard, dubbed C++0x," wrote J. Jarvi and colleagues, Texas A&M University ...read more


Computer Programming - Findings from Texas A&M University provide new insights into computer programming

  2010 AUG 26 - (VerticalNews.com) -- According to recent research from the United States, "A key benefit of generic programming is its support for producing modules with clean separation. In particular, generic algorithms are written to work with a wide variety of types without requiring modifications to them."

  "The Runtime concept idiom extends this support by allowing unmodified concrete types to behave in a runtime polymorphic manner. In this paper, we describe one implementation of the runtime concept idiom, in the domain of the C++ standard template library (STL). We complement the runtime concept idiom with an algorithm library that considers both type and concept information to maximize performance when selecting algorithm implementations. We present two implementations, one in ISO C++ and one using an experimental language extension. We use our implementations to describe and measure the performance of runtime-polymorphic analogs of several STL algorithms," wrote P. Pirkelbauer and colleagues, Texas A&M University ...read more


Computer Programming - Findings from J.J. Hallett and co-authors broaden understanding of computer programming

  2010 AUG 26 - (VerticalNews.com) -- "Coercion can greatly improve the readability of programs, especially in arithmetic expressions. However, coercion interacts with other features of programming languages, particularly subtyping and overloaded functions and operators, in ways that can produce surprising behavior," investigators in the United States report.

  "We study examples of such surprising behavior in existing languages. This study informs the design of the coercion mechanism of Fortress, an object-oriented language with multiple dynamic dispatch, multiple inheritance and user-defined coercion," wrote J.J. Hallett and colleagues ...read more


View more articles on Computer Programming.
VerticalNews

Subscribe to VerticalNews Computers

Buy Now
VerticalNews



VerticalNews
SSL VerticalNews