Currently the grammar supports the concept of extending responses with an entity.
response extends Base { ... }
This has recently been changed to
response mixin Base { ... }
At the moment Base should be defined as an entity, however it would be better to introduce a specific keyword to specify something that can be "mixed in"
Some languages have the concept of categories, it could work like this:
properties Base {
status:boolean,
message:string
}
Which is basically a bag of properties that can be 'mixed in' with other entities.
SInce some responses can be defined anonymously (which might be a bad thing anyway), ie:-
resonse {
status:boolean,
message:string
}
Then it makes sense to allow a mixin here (which mechanoidnet supports as extends, ie:-
response mixin Base {
qux:string
}
and as mentoined with entities:-
entity Repository mixin Base {
id:int,
name:string
}
Currently the grammar supports the concept of extending responses with an entity.
This has recently been changed to
At the moment Base should be defined as an entity, however it would be better to introduce a specific keyword to specify something that can be "mixed in"
Some languages have the concept of categories, it could work like this:
Which is basically a bag of properties that can be 'mixed in' with other entities.
SInce some responses can be defined anonymously (which might be a bad thing anyway), ie:-
Then it makes sense to allow a
mixin
here (which mechanoidnet supports asextends
, ie:-and as mentoined with entities:-