Copper, a minimal C replacement language with generics and option types
The project page for Copper opens with a plain statement: it is a programming language that the author uses as a replacement for C. The page then lists twelve main differences from C: type inheritance for any type, genericity, multiple return values, out-of-order definitions, a simple import system with no headers, not everything living in the global namespace, deferred statements, simple iterators, Ruby-style syntax, option types, fast compilation, and minimalism.
Of these, the author calls minimalism the most important. In the author's own self-deprecating words, the language is meant to be simple enough that "someone with limited brain power such as me" could fully understand it. The syntax is described as simple, with almost everything explicit and most constructs common.
The page includes a short example that it presents as going beyond a pointless "hello world". It defines a class Point with two Int attributes, x and y, an init method that sets them, and a translate method that adds offsets to them. Blocks open with keywords such as class, def and func and close with end, which is where the Ruby flavour shows. A main function returning Int declares a variable of type Point!, calls init with 3 and 5, calls translate with 1 and 0, prints the coordinates with println using \a placeholders, and returns 0. The example also contains an import of "std".
The page points to further material: a quick overview of the language, documentation, a cheat sheet for readers who are not interested in the language but want to understand existing code, more examples, and browsable source for both the standard library and the compiler. Copper is released under the BSD license.
Key facts
- The author describes Copper as a programming language used as a replacement for C.
- The page lists twelve main differences from C, including type inheritance for any type, genericity, multiple return values, deferred statements, option types and fast compilation.
- Syntax is Ruby-style, with blocks closed by end; the author calls minimalism the most important feature.
- The page gives a Point class example with attributes, init and translate methods, and a main function.
- Documentation, a cheat sheet, more examples, and the standard library and compiler source are linked; the license is BSD.
Why it matters
Copper is a small, single-purpose answer to a familiar question: what would C look like with a few modern conveniences and nothing else? The listed differences are generics, inheritance, multiple return values, option types, deferred statements and a header-free import system. The author puts minimalism above all of them, so the project is a case study in keeping a systems language small rather than a bid to match the feature lists of larger languages.
Who it affects
Mainly programmers who write C and are curious about alternatives with a simpler surface, and anyone interested in language design on a small scale. The page presents Copper as the author's own tool, so its direct audience is people willing to read the documentation and the compiler source and try it themselves.
How to use it
The page links a quick overview of the language, documentation, a cheat sheet (aimed at readers who only want to understand existing code), more examples, and browsable source for the standard library and the compiler. The license is BSD, as stated on the page. A reader new to the language can start with the Point example, which shows classes, attributes, methods, a main function and the import of "std".
How solid is it
The page is the author's own description of the project in the first person, so every claim about features is a self-report. The feature list is concrete and the example and source links let a reader check it. 'Fast compilation' appears only as a bullet item. No author name is given in the text.
Risks and caveats
The page gives no version number or release date, no benchmarks or compilation-speed figures, and does not say what Copper compiles to or which platforms it supports. It names no users or projects other than the author's own use, and it does not say which BSD variant applies. Anyone considering Copper for real work would need to judge maturity from the documentation and the source.
“Minimalism is the most important feature, the language is intended to be simple so that someone with limited brain power such as me could fully understand it.”
— Copper project page, tibleiz.net