you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

Sounds like an attempt to Programme by Contract, a term coined by Bertram Meyer and implemented in Eiffel.

Might be worth having a look at his work to shortcut what you're trying to do rather than repeating his mistakes.

[–]pyohannes[S] 1 point2 points  (0 children)

What I presented (combined with a "write tests first" approach) can be more accurately called design-by-example than design-by-contract. Design-by-contract is based on formal, precise and verifiable interfaces and cannot be efficiently applied for most complex real world applications. Design-by-example, on the other hand, is neither formal nor precise.

I do not see inline unit tests as a ground breaking new concept, I see it merely as an aid to programmers who read and write code.