> So it is quite common pattern. Collection of objects with common interface on 
> which you perform some action. How can I preserve such functionality avoiding 
> using methods

Uhm, did you mean for interface? Like discussed in [this 
thread](https://forum.nim-lang.org/t/2741)?

If you need to call some field/method that act accordingly when it's defined, I 
think closure is your best bet.

it's said "closure is poor man's method"

But I personally prefer closure instead of method though

Reply via email to