IMO, Concept syntax is great from the user perspective. It clearly describes 
what concept can do. From the implementer pointer of view it look like it is 
far too easy to miss concept requirement and you are not sure while writing the 
code you are matching the concept or not.

I don't think what you describe as _declarative_ is going to work, because 
procs are not attached to type in Nim, they are freestanding and can be 
implemented in a different module then type is declared. Therefore you can't 
say if type is matching a concept or not by looking at a type definition. 
Developer can write in a separate file an adaptor to match the concept 
separately from actual object type. I don't have to rewrite objects to match a 
concept and it is a big win in my opinion.

What is missing is a simple proc `concept_check` that can at compile time check 
if concept is matched or not and the _location_ of the mismatch. Developer can 
invoke it in the right place, usually _after_ the procs not at a type def.

P.S. I think we should stop bitch and moan regarding concepts. Concepts are 
GREAT until someone find courage to implement something better. You are not 
happy with the concepts? Go and invest your next 9-16 months in a better 
solution. Once you have implemented it we can compare.

Reply via email to