Documentation for syntax


For example, I see the following line in a C3 Type.

type AAAA {
  field1: ~= "BBBB"

I want to understand what ~= means. Where can I read some documentation?


I think this means you are taking the same type definition as the type that AAA mixes in, and additionally defining a default value of "BBBB"


Thanks for answering this particular definition. However, I’m looking for the documentation for all syntax / syntax sugar


I think John C is working on putting the type grammar in the documentation, but it’s not ready yet. That only covers what is valid syntax, and does not explain what is syntactic sugar for something else.

In the meantime, these 2 pages cover many, but not all, syntax details (replace localhost:8080 with your server URL):
I don’t think it covers the specific question you asked, though, so it’s still incomplete.


You probably don’t see that exact syntax, your type must be mixing or extending another one where field1 is defined.

~= is the same as ~ = so is the combination or inheritance and default value, which are pretty commonly used features (but usually independently).