Wednesday, January 10, 2018

The Kiczales HtDF Way

To design Functions :

1. Signature, purpose, stub.
2. Define examples, wrap each in check-expect.
3. Template and inventory.
4. Code function and body.
5. Test and debug till done.

signature : type of each arg, separated by spaces, followed by -> type of result.
purpose - a meaningful one line statement.
stub : syntactically complete function definition that produces a value of the right ype. This makes it possible to run examples even before the function design is complete..

You ain't got UBC under your thumbnail for nothin bro.

No comments: