1,871 research outputs found
Bridging the gap between design and implementation of components libraries
Object-oriented design is usually driven by three main reusability principles:
step-by-step design, design for reuse and design with reuse. However, these
principles are just partially
applied to the subsequent object-oriented implementation, often due to efficienc
y
constraints, yielding to a gap between design and implementation. In this paper
we provide a solution for bridging this gap for a concrete framework, the one of
designing and implementing container-like component libraries, such as STL, Booc
h
Components, etc. Our approach is based on a new design pattern together with its
corresponding implementation. The proposal enhances the same principles that
drive the design process: step-by--step implementation (adding just what is
needed in every step), implementation with reuse (component implementations are
reused while library implementation
progresses and component hierarchies grow) and implementation for reuse
(intermediate component implementations can be reused in many different points o
f
the hierarchy). We use our approach in two different manners: for building a
brand-new container-like
component library, and for reengineering an existing one, Booch Components in
Ada95.Postprint (published version
C++ Standard Template Library by template specialized containers
The C++ Standard Template Library is the flagship example for libraries based
on the generic programming paradigm. The usage of this library is intended to
minimize the number of classical C/C++ errors, but does not warrant bug-free
programs. Furthermore, many new kinds of errors may arise from the inaccurate
use of the generic programming paradigm, like dereferencing invalid iterators
or misunderstanding remove-like algorithms. In this paper we present some
typical scenarios that may cause runtime or portability problems. We emit
warnings and errors while these risky constructs are used. We also present a
general approach to emit "customized" warnings. We support the so-called
"believe-me marks" to disable warnings. We present another typical usage of our
technique, when classes become deprecated during the software lifecycle
Runtime-Flexible Multi-dimensional Arrays and Views for C++98 and C++0x
Multi-dimensional arrays are among the most fundamental and most useful data
structures of all. In C++, excellent template libraries exist for arrays whose
dimension is fixed at runtime. Arrays whose dimension can change at runtime
have been implemented in C. However, a generic object-oriented C++
implementation of runtime-flexible arrays has so far been missing. In this
article, we discuss our new implementation called Marray, a package of class
templates that fills this gap. Marray is based on views as an underlying
concept. This concept brings some of the flexibility known from script
languages such as R and MATLAB to C++. Marray is free both for commercial and
non-commercial use and is publicly available from www.andres.sc/marrayComment: Free source code availabl
The C++0x "Concepts" Effort
C++0x is the working title for the revision of the ISO standard of the C++
programming language that was originally planned for release in 2009 but that
was delayed to 2011. The largest language extension in C++0x was "concepts",
that is, a collection of features for constraining template parameters. In
September of 2008, the C++ standards committee voted the concepts extension
into C++0x, but then in July of 2009, the committee voted the concepts
extension back out of C++0x.
This article is my account of the technical challenges and debates within the
"concepts" effort in the years 2003 to 2009. To provide some background, the
article also describes the design space for constrained parametric
polymorphism, or what is colloquially know as constrained generics. While this
article is meant to be generally accessible, the writing is aimed toward
readers with background in functional programming and programming language
theory. This article grew out of a lecture at the Spring School on Generic and
Indexed Programming at the University of Oxford, March 2010
- …