6 ms·
So, this Functional Reactive Programming stuff compiles to Javascript, right? Is the resultant Javascript just a bunch of nested callbacks, as in the example t
by jawns 14y ago
So, this Functional Reactive Programming stuff compiles to Javascript, right?
Is the resultant Javascript just a bunch of nested callbacks, as in the example the blog post uses to illustrate spaghetti code?
- pufuwozu 14y agoYes. Elm is a FRP language that compiles to JavaScript. View source on some of the examples: http://elm-lang.org/Examples.elm http://elm-lang.org/Examples.elm
- eblume 14y agoThe 'big problem' with callbacks isn't the callbacks themselves - it's the resulting difficulty to the developer to keep track of the flow of control. This is analogous to goto's - programming with goto is a nightmare, but all code 'compiles to' some sort of immediate form using goto's. The goto is not the problem, programming with goto is.