3 ms·
My (quite oldschool) professor taught me about this top-down design. This kind of "write as if you have all the methods you want/need" style is sometimes called
by cheshire_cat 13y ago
My (quite oldschool) professor taught me about this top-down design. This kind of "write as if you have all the methods you want/need" style is sometimes called "Wishful Programming" http://blog.thesoftwarecraft.com/2013/11/wishful-programming.html http://blog.thesoftwarecraft.com/2013/11/wishful-programming...
Bart Bakker references "Structure and Interpretation of Computer Programs" as an early source and I'm somewhat positive that I read about an similar approach in "How to design programs 2nd ed", called "programming with a wish list".
Edit: I found the mention in HtDP but as I understand it it's not exactly the same as wishful programming:
http://www.ccs.neu.edu/home/matthias/HtDP2e/part_one.html http://www.ccs.neu.edu/home/matthias/HtDP2e/part_one.html
under "3.4 From Functions to Programs"
- agumonkey 13y agoI remember doing something similar in college using Eclipse/Java (but any static analysis friendly language with on-the-fly type checker would do) and it was pure fun. You just write the code as you'd want it to be, the IDE will flag missing classes/interfaces and generate them on the go if you tell them, and if down the road you use one interface differently the IDE will extend or ~reparameterize it for you. You end up with an abstract system/algorithm that works by type checked interfaces you can now implement.