someone needs to write sicp/htdp but with types
-
-
basically i want something like
@edwinbrady's TDD w/ Idris but as an intro programming/SWE book. i'd refuse to teach anything else!1 reply 0 retweets 1 likeShow this thread -
Replying to @sivawashere @edwinbrady
Curious how different it would be from HtDP, which is arguably type-centric, but just with a runtime focus. What’s the educational value of static type analysis for CS1?
1 reply 0 retweets 0 likes -
Replying to @wcrichton @edwinbrady
1/2 as you said, htdp is "runtime-type-driven" in that the programmer gets the behavioral contract down ahead of time but ultimately has to write _and_ test the program themselves to see if the contract was satisfied
1 reply 0 retweets 0 likes -
2/3* i'm interested in seeing how effective "compile-type-driven" development is in an educational setting. that is, formally specifying contracts within the language and writing programs by interacting with the compiler
1 reply 0 retweets 1 like -
3/3 tests then can be used to develop intuition for what contracts are wanted in the first place and when compile-time enforcement becomes too cumbersome
1 reply 0 retweets 0 likes -
Replying to @sivawashere @edwinbrady
That makes sense. Seems most effective to teach it in the broader context of abstract interpretation. First you teach students how to formalize a problem into a function defn + pre/postconds, which is the first key skill (“x is an int”, “x > 0”, “f(x) = x + 1”), as in 15-122.
1 reply 0 retweets 1 like -
Then check conditions first by examples (unit tests), e.g. for a given input x = 5, we can check x int > 0, and run function to get 6. But then say “what if we ‘ran’ the function without setting x? What could we know?"
1 reply 0 retweets 1 like
Key idea being that you teach people static analysis operationally, so they can conceptualize it consistently with how they learn the dynamics. Essentially extending the idea of "notional machines" (https://dl.acm.org/citation.cfm?id=2483713 …) but to abstract interpretation.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
cognitive psychology. PhD