Why don't purely functional languages use reference counting?

Posted by Zifre on Stack Overflow See other posts from Stack Overflow or by Zifre
Published on 2009-04-26T19:24:54Z Indexed on 2010/12/22 21:54 UTC
Read the original article Hit count: 482

In purely functional languages, data is immutable. With reference counting, creating a reference cycle requires changing already created data. It seems like purely functional languages could use reference counting without worrying about the possibility of cycles. Am is right? If so, why don't they?

I understand that reference counting is slower than GC in many cases, but at least it reduces pause times. It would be nice to have the option to use reference counting in cases where pause times are bad.

© Stack Overflow or respective owner

Related posts about memory-management

Related posts about functional-programming