The Artima Developer Community
Sponsored Link

Heron-Centric: Ruminations of a Language Designer
Object Oriented Template Library ( OOTL ) version 0.1
by Christopher Diggins
November 25, 2004
Summary
I have made a first public release of the C++ Object Oriented Template Library ( OOTL ). An open-source library with the rather ambitious goals of providing object-oriented alternatives to the C++ primitives and the STL collections.

Advertisement

The C++ Object Oriented Template Library ( OOTL ) is a brand new open-source library, using the Boost C++ Library license with the rather ambitious goals of providing a more object-oriented alternative to the C++ primitives and the STL.

One of my biggest beefs with the STL and the C++ primitives, and a complaint I frequently hear being voiced, is that they are not object-oriented. One of the joys of C++ is that it is immensely flexible and powerful, so it does give us the tools to define our own object-oriented libraries.

Up until recently the only real obstacle I faced in making my own object oriented library was that polymorphism was expensive. The problem is now no longer significant with a new C++ interfaces library about to be released as a beta-release by Jonathan Turkanis called the Boost Interfaces Library ( BIL ). The BIL is not yet in fact a Boost library, but the name reflects the intention for eventual submission to the library.

The BIL is a set of macros which use a technique I wrote about in the September 2004 issue of the C++ Users Journal for implementing efficient interfaces without abstract base classes. The major advantages of this technique are that it provides us with run-time polymorphism without the overhead of virtual tables within objects. This means we can uses lightweight objects efficiently. Another advantage is that there is no need to pre-declare the intention of implementing interface as is required in Java and C#.

The OOTL has two primary sub-libraries, one for primitives and the other for collections. The OOTL primitives library, provides lightweight object-oriented alternatives to the C++ built-in types. The OOTL collections library provides a set of interfaces and classes for abstract data types such as Stacks, Queues, Deques, Arrays, Lists and so on.

The OOTL has some extensive documentation at http://www.ootl.org, it is downloadable through SourceForge at http://www.sf.net/projects/ootl and there is a google mailing list / discussion forum at http://groups-beta.google.com/group/ootl/

Talk Back!

Have an opinion? Readers have already posted 14 comments about this weblog entry. Why not add yours?

RSS Feed

If you'd like to be notified whenever Christopher Diggins adds a new entry to his weblog, subscribe to his RSS feed.

About the Blogger

Christopher Diggins is a software developer and freelance writer. Christopher loves programming, but is eternally frustrated by the shortcomings of modern programming languages. As would any reasonable person in his shoes, he decided to quit his day job to write his own ( www.heron-language.com ). Christopher is the co-author of the C++ Cookbook from O'Reilly. Christopher can be reached through his home page at www.cdiggins.com.

This weblog entry is Copyright © 2004 Christopher Diggins. All rights reserved.

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us