2009 · 16 citations · 11 references
ComputingComputer ScienceCompilersProgramming LanguagesSystems ProgrammingApplication Programming InterfacesControl-flow AnalysisAsynchronous ProgrammingEvent-driven ProgrammingJavascriptJavascript FrameworksMonadic EffectsMonadic SemanticsMonadsState Machines
JavaScript programmers make extensive use of event-driven programming to help build responsive web applications. However, standard approaches to sequencing events are messy, and often lead to code that is difficult to understand and maintain. We have found that arrows, a generalization of monads, are an elegant solution to this problem. Arrows allow us to easily write asynchronous programs in small, modular units of code, and flexibly compose them in many different ways, while nicely abstracting the details of asynchronous program composition. In this paper, we present Arrowlets, a new JavaScript library that offers arrows to the everyday JavaScript programmer. We show how to use Arrowlets to construct a variety of state machines, including state machines that branch and loop. We also demonstrate how Arrowlets separate computation from composition with examples such as a drag-and-drop handler and a bubblesort animation.
11
The essence of functional programming
Philip Wadler · 1992 · 676 citations · Full text
John Hughes · Science of Computer Programming · 2000 · 517 citations
Rob von Behren, Jeremy Condit, Feng Zhou et al. · ACM SIGOPS Operating Systems Review · 2003 · 253 citations
Cooperative Task Management Without Manual Stack Management
Atul Adya, Jon Howell, Marvin Theimer et al. · 2002 · 241 citations