Anytype is getting renamed to anyval (!)

I agree that the desire to put constraints into function signatures is just and reasonable. However, I believe that the current anytype, supplemented with subsequent comptime type checks, is sufficient for expressing parameter constraints and allows them to be completed within the function signature itself, as referenced in the method mentioned in this post using block expressions. Various solutions such as interfaces seem to me prone to local optima and are not sufficient to express all parameter constraints at comptime.

I agree that the idea of infer is very good, but I think it is equivalent to the current expressiveness of anytype, just a little prettier; if there is infer, that’s great, but if not, I can also accept it.

2 Likes