Standard Library
The standard library is in the namespace cilia (instead of std, to avoid naming conflicts and to allow easy parallel use).
There is a Cilia variant of each standard class/concept (with CamelCase class names and camelCase function and variable names):
cilia::Stringinstead ofstd::stringSharedPtrinstead ofshared_ptrValueTypeinstead ofvalue_typeMapinstead ofmapFlatMapinstead offlat_map
Setinstead ofsetFlatSetinstead offlat_set
Some exceptions/variations:
Arrayinstead ofvectorStringStreaminstead ofstringstreamTextStream,ByteStream, …
LinkedListinstead oflist(a doubly linked list)ForwardLinkedListinstead offorward_list(a singly linked list)
HashMapinstead ofunordered_mapMultiMapinstead ofmultimapHashMultiMapinstead ofunordered_multimap
HashSetinstead ofunordered_setMultiSetinstead ofmultisetHashMultiSetinstead ofunordered_multiset
Shallow Wrappers
Mostly realized as shallow wrappers, like
class cilia::String : public std::string { ... }
with “aliases” for:
- Member variables
using var x = data[0]
using var y = data[1] - Member functions
using func pushBack = push_back
A wrapper is not strictly necessary, Cilia can access/call every C/C++ class/function without it. We can even use the basic Cilia types when using the C++ APIs,
e.g.
T[]forvector<T>,Int32forint32_t,Stringforstring.
But only with a wrapper do we have a Cilia standard library in the “idiomatic” Cilia style, i.e.
- CamelCase class names,
- camelCase function names,
Intinstead ofsize_t.