4 ms·
Have you seen Nim's concepts? [1] They sound similar to what you're describing. The semantics are slightly different from Python. 'a[x .. ^1]' means 'The items
by dom96 11y ago
Have you seen Nim's concepts? [1] They sound similar to what you're describing.
The semantics are slightly different from Python. 'a[x .. ^1]' means 'The items of a from x to the last element'
- dom96 11y agoOops, forgot to include link to concepts: http://nim-lang.org/docs/manual.html#generics-concepts http://nim-lang.org/docs/manual.html#generics-concepts
- Symmetry 11y agoAnd if Nim replaces inheritance with concepts and composition I'd be quite happy. But I think they'll end up existing side by side and most things will use inheritance based polymorphism.