GOOL: A Generic Object-Oriented Language (extended version)
Jacques Carette, Brooks MacLachlan, W. Spencer Smith

TL;DR
GOOL is a versatile embedded DSL in Haskell that captures core object-oriented programming concepts, enabling the generation of clear, idiomatic code across multiple languages like Python, Java, C#, and C++.
Contribution
It introduces GOOL, a novel generic object-oriented language that effectively models common programming idioms and patterns for multi-language code generation.
Findings
GOOL can generate human-readable code in multiple languages.
It successfully expresses complex design patterns like Observer, State, and Strategy.
GOOL demonstrates the feasibility of a unified language for diverse object-oriented programming tasks.
Abstract
We present GOOL, a Generic Object-Oriented Language. It demonstrates that a language, with the right abstractions, can capture the essence of object-oriented programs. We show how GOOL programs can be used to generate human-readable, documented and idiomatic source code in multiple languages. Moreover, in GOOL, it is possible to express common programming idioms and patterns, from simple library-level functions, to simple tasks (command-line arguments, list processing, printing), to more complex patterns, such as methods with a mixture of input, output and in-out parameters, and finally Design Patterns (such as Observer, State and Strategy). GOOL is an embedded DSL in Haskell that can generate code in Python, Java, C# and C++.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsModel-Driven Software Engineering Techniques · Advanced Software Engineering Methodologies · Logic, programming, and type systems
