Re:If monads are the solution, what is the problem?
by lmm on Wednesday August 01, 2018 @04:29AM
(#17660558)
> Well, scheduling is important. I can't connect my new phone to the computer until I've taken it out of the box it came in.
That's not scheduling, that's a data dependency which functional style handles very well. Imperative would be more like deciding you have to unpack the charger and then unpack the phone and then charge the phone, when in fact it's fine to unpack them in either order. http://www.lihaoyi.com/post/WhatsFunctionalProgrammingAllAbo... has an extended example.
Re:If monads are the solution, what is the problem?
by magicalhippo on Wednesday August 01, 2018 @09:06AM
(#17662094)
Good point, thanks for the correction.
Re:If monads are the solution, what is the problem?
by tathougies on Wednesday August 01, 2018 @03:08PM
(#17665883)
I think codeworld is a more functional alternative to scratch, although much less drag and drop. Check it out.. It's pretty fun! https://code.world/
It feels like I'm leaning to the imperative side. When breaking down the problem into substeps, I'm already thinking about the sequencing which will later dictate the scheduling.
I've been teaching Scratch[1] to 11-13 year olds for a few years now, and most seem to pick it up pretty quick. However a few struggle (while still being motivated enough to keep trying). Would be interesting to see how it went with a functional Scratch version.
[1]: https://scratch.mit.edu/