Hi,
I am a data scientist and have been experimenting with nim some time ago (my first and only serious attempt of using it is my Arrayfire wrapper https://github.com/bitstormGER/ArrayFire-Nim which I want to refresh soon)
After revisiting nim and comparing it with other candidates like rust and swift I think that nim is best suited for some projects I have in mind but I would need help to find replacements for programming patterns I have been using intensively in the past and I am not sure how a good alternative in nim would look like.
In languages like kotlin in scala I often write interfaces or traits which capture my expectations to types and I found that I can use nim concepts in a similar way but I did not find out how do declare that I intend a type to comply to a concept.
I have a feeling that I am looking in the wrong direction and that the proper way to express constraints to types in nim is different? I have also tried to use type inheritance but this seems to be to limiting.
If anybody has a good solution for this or even an overview of how the idea behind some other OOP approaches can be translated to nim I would highly appreciate any help – I guess I’m just a fossil if it comes to this.
I would also like to express my gratitude to the nim developers and community for all the great work.
Many thanks in advance
how do declare that I intend a type to comply to a concept.