Hacker News new | past | comments | ask | show | jobs | submit login
Natural Async Programming - samholmes (samholmes.me)
1 point by samholmes on April 5, 2013 | hide | past | favorite | 2 comments



Looks like this concept is out there. FRP (Functional reactive programming), or as I like to call it FAP (functional adaptive programming ;P), is the idea that values (return values even) can change over time and therefore all statements depending on those values will re-evaluate. I like this concept. It's almost like all values can be streams of values. I like how Elm (programming language/DSL) calls them signals because they're almost like streams, but hold a value at any given time (I suppose). I really wish JS had this implementation.


Updated the entry with some further examples. You can see how this makes libraries like async (by caolan) unnecessary. Asynchronous functions could just be functions that don't return a value immediately. Other statements that depend on these values being returned by the asynchronous functions would be queued for execution automatically by the interpreter. This makes all async parallel, and async in a series wouldn't even be in the thinking of the programmer.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: