Results 1 -
2 of
2
Iteration Abstraction in Sather
- ACM Transactions on Programming Languages and Systems
, 1996
"... ion in Sather STEPHAN MURER, STEPHEN OMOHUNDRO, DAVID STOUTAMIRE, and CLEMENS SZYPERSKI International Computer Science Institute Sather extends the notion of an iterator in a powerful new way. We argue that iteration abstractions belong in class interfaces on an equal footing with routines. Sather i ..."
Abstract
-
Cited by 21 (1 self)
- Add to MetaCart
ion in Sather STEPHAN MURER, STEPHEN OMOHUNDRO, DAVID STOUTAMIRE, and CLEMENS SZYPERSKI International Computer Science Institute Sather extends the notion of an iterator in a powerful new way. We argue that iteration abstractions belong in class interfaces on an equal footing with routines. Sather iterators were derived from CLU iterators but are much more flexible and better suited for object-oriented programming. We retain the property that iterators are structured, i.e. strictly bound to a controlling structured statement. We motivate and describe the construct along with several simple examples. We compare it with iteration based on CLU iterators, cursors, riders, streams, series, generators, coroutines, blocks, closures, and lambda expressions. Finally, we describe experiences with iterators in the Sather compiler and libraries. Categories and Subject Descriptors: D.1.5 [Programming Techniques]: Object-oriented Programming; D.3.3 [Programming Languages]: Language Constructs and Fe...
Systems need languages need systems
- In 2nd ECOOP Workshop on Programming Languages and Operating Systems
, 2005
"... Domain-specific language and compiler extensions can significantly reduce the complexity of systems, especially when written in C or C++. However, instead of the current variety of ad-hoc implementation strategies, which include preprocessor macros, C++ templates, and custom-built language processor ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
Domain-specific language and compiler extensions can significantly reduce the complexity of systems, especially when written in C or C++. However, instead of the current variety of ad-hoc implementation strategies, which include preprocessor macros, C++ templates, and custom-built language processors, system builders need a uniform and general facility for realizing their own extensions. In this paper, we argue that macros can provide this solution, as they provide a concise specification of how to transform a program at compile time. We develop the requirements for a suitable macro facility, outline the structure of the corresponding macro processor, called xtc for eXTensible C, and explore the implications of starting to build it. We conclude that only a tighter integration between system and language efforts can help us achieve the benefits of language and compiler extensibility and cope with the complexity of modern systems. 1 Systems Need... The utilization of programming language and compiler technologies in operating and distributed systems certainly is not new [2]; notable examples include the Pilot [13], Oberon [16], and SPIN [3] operating systems as well as the Fox Project’s network protocol stack [4]. Yet the vast majority of system builders continues to rely on C (or C++) instead of fully type-safe or functional languages. When they need additional expressive power, they tend to add their own, domain-specific idioms to the base language by using a variety of ad-hoc implementation strategies, including preprocessor macros, C++ templates, or even custom-built language processors. However, the unfortunate result is that existing language and compiler extensions are mutually incompatible and that new extensions are hard to realize. To illustrate the power of domain-specific language and compiler extensions and the range of implementation strategies, consider libasync [10] for building eventdriven distributed services, Capriccio [15] for building multi-threaded servers, and MACEDON [14] for building overlay networks. Common to these projects is that they all build on C or C++, that runtime support is not sufficient, and that they require language or compiler support. At the same time, they differ significantly in

