Seymour Papert[0] was all over this idea. He used software to develop an entire theory of learning, and he invented LOGO to implement that theory.
LOGO changed my life as a kid and turned me into a programmer back then, so I'm definitely a believer in his ideas!
[0] https://en.m.wikipedia.org/wiki/Seymour_Papert