4 ms·
Well, in practice you're presumably using a database, which has transactions in the API you're using. But to answer your question, in functional programming (a
by jnbiche 7y ago
Well, in practice you're presumably using a database, which has transactions in the API you're using.
But to answer your question, in functional programming (also frequently ReactJS, if you use libraries like Redux), you don't mutate the data structure. You create a new data structure based off the old one.
Am I misunderstanding your question? Just because you use an immutable data structure doesn't mean it can't be updated.
- dboreham 7y agoDatabase written in not(Javascript) of course, since it has to work and handle concurrency properly.
- jnbiche 7y agoYes, of course. Why would you build a database in JS? And does gmail not work well for you? Most of us are only using JavaScript because that's the only way to build browser applications (or compile-to-JS languages, which still require an understanding of JS or you'll run into problems). In any case, I don't particularly like JS, so your dig fell short. But JS is necessary for many of us.
- zo1 7y ago> "Most of us are only using JavaScript because that's the only way to build browser applications (or compile-to-JS languages, which still require an understanding of JS or you'll run into problems)." The javascript apocalypse is inevitable, we're just yet to reach the tipping point where this hard-requirement to use JS for web/browser applications is no longer there.