How do I extend the datatype system

@Hamdy maybe you can tell what language you come from and how it’s done in that language?