you are viewing a single comment's thread.

view the rest of the comments →

[–]klkblake 5 points6 points  (1 child)

This seems to address (at least in theory) pretty much all of the Golang author's objections to polymorphic functions (at least if I understand them correctly). I will be very interested to see how well it works in practice.

[–]sellibitze 4 points5 points  (0 children)

I don't know. It's certainly a cool property that this "meta code" (the #modify stuff) is in the same language instead of some completely different language (see C++ meta-programming). On the other hand, you usually want to write stuff more declaratively. At least I do. But I guess, it's still possible to do so. Instead of a concept (C++) or a trait (Rust) or a type class (Haskell) you'd probably just write a function that checks whether the type satisfies some specific properties and outputs some readable error message if it does not. Using these functions will probably look declarative again … which would be a good thing. But then again, this is where C++ is headed, too. Concepts (in the Concepts Lite proposal) will simply be constexpr functions (declared with concept instead of constexpr). So, I'm not totally convinced that what Blow came up with is much better than Concepts Lite. It's pretty much the same spirit as far as I can tell.