google / codeworld

Educational computer programming environment using Haskell
http://code.world
Apache License 2.0
1.24k stars 193 forks source link

API for composing animations #437

Open cdsmith opened 7 years ago

cdsmith commented 7 years ago

We've been discussing a nice compositional API for animation on the mailing list. Mailing list thread at https://groups.google.com/forum/#!topic/codeworld-discuss/x9OofmLj8Ek.

The latest draft API is at https://code.world/#PBq2HkC8axLVGWaE6zljRQQ.

cdsmith commented 7 years ago

Just to throw this out there, once you're broadly happy with it, I'd be quite happy to accept a pull request to add this library to a sub-module... say, codeworld-api:CodeWorld.Motion for a plain Haskell variant, and a base-ified version in codeworld-base:Motion?

I'm somewhat more hesitant to increase the surface area of codeworld-api:CodeWorld or codeworld-base:Prelude. For context, this is several times more new definitions than were needed for all of animations, simulations, interactions, and multi-player games all put together! Perhaps introducing CodeWorld students to imports (which I'd previously avoided) isn't so bad given that context!