@mashingan Yeah, that's true. However, the proposed idea would be a very 
comfortable way to override library's methods. But because of UB now user has 
to pass either subclass with custom methods or pointers to procs to the library 
which I find a bit messy.

Imagine a math library which does some calculations. Inside it there's a method 
to calculate square root. One day user understands that he knows a better and 
faster square root implementation. How can he "inject" it there? Currently 
there's no way unless lib authors allow him (in advance) to use some setting 
like sqrt = ref proc(x: float): float

P.S. I came from Python so static programming languages are big pain for me 

Reply via email to