r/programming • • Oct 12 '17

JavaScript's Promise Leaks Memory

https://alexn.org/blog/2017/10/11/javascript-promise-leaks-memory.html
26 Upvotes

19 comments sorted by

View all comments

0

u/[deleted] Oct 13 '17

[deleted]

3

u/swaggler Oct 13 '17

Oh yes, please tell us the difference.

0

u/[deleted] Oct 13 '17

[deleted]

3

u/swaggler Oct 14 '17

Can you please explain the difference between functional programming, and pure functional programming?

0

u/[deleted] Oct 14 '17

[deleted]

7

u/swaggler Oct 14 '17

There is a FP course running next week. Want to come?

I don't want anyone to get shot.

1

u/Tarmen Oct 16 '17 edited Oct 16 '17

The problem is that "have no side effects" is a really wonky category. Consuming cpu time is a side effect from the view of a side channel attack. No side effects from the view of the program works better but runs into other issues.

Also, the world-passing thing is more of an implementation detail of the current implementation of monadic io in ghc - it just encodes the implicit sequencing similar to a memory barrier in cpu's.

And tco is used in a ton of non-pure functional languages. Well, your definition of functional includes languages like java so maybe it isn't the majority but virtually all traditional functional languages at least allow it.