Skip to content
Tech News
← Back to articles

C3 0.8.2 a Modest Improvement

read original more articles

C3 0.8.2 A modest improvement

C3 0.8.2 is out. This release brings a batch of language ergonomics improvements — most notably reusable target templates for libraries and generic constdef — along with new reflection capabilities and a round of bug fixes.

Compared to 0.8.1, this is a rather modest release, but anyway, here's what's new:

Language changes & improvements¶

Reusable target configurations for libraries¶

Libraries can now expose a templates map in their manifest, and projects can pull one into a target with template: "library/template". Template properties load first and target-local settings override them, so libraries can ship sensible, shareable build configurations instead of asking every user to copy-paste setup.

Reflection for generics¶

Foo::is_generic(...) , Foo::generic_qname , and Foo::generic_args finally lets you inspect generic instantiations.

alias Foo = List { int }; fn void main () { typeid t = List { String } :: generic_args [ 0 ]; //String::typeid String name = Foo :: generic_qname ; // "std::collections::list::List" bool x = Foo :: is_generic ( List ); // true bool y = int :: is_generic ( List ); // false }

Bitstruct properties¶

... continue reading