3 ms·
Pedagogically, the nice thing about the examples/tests just being code for beginners is that they are... just code! Once we've taught students about function c
by jpolitz 10y ago
Pedagogically, the nice thing about the examples/tests just being code for beginners is that they are... just code!
Once we've taught students about function calls and values, it's a small jump to write an example with "is" in the middle. The syntax errors, static errors about unbound identifiers, and dynamic behavior all act the same as everywhere else in the program, so it's less friction to write the first test.
For getting off the ground writing that first test, I've been really happy with what Pyret lets us do. There is more involved in getting better testing/reporting options as systems scale up (we have lots of test-only files for the compiler), but pedagogically, the testing block infrastructure has worked well.