Re:Writing Your Own Programming Language
by kd0amg on Thursday November 10, 2016 @06:41PM
(#12925794)
It's not really being functional that calls for GC -- if you have data structures (whether they're closures, records, or whatever) escaping up from the scope in which they were created, you have a tricky lifetime question to deal with. In both the imperative and functional cases, you could require explicit allocation and deallocation (like malloc/free), and you could make it automatic (garbage collection). Functional programming tends to use GC because passing/returning closures is a common thing to do. These days, I would say imperative programmers also tend to use GC.
[ Parent
| on HN ]
There are no comments on this comment yet.