Are there any functional languages ​​that do not contain garbage collection

Or even highly functional styles in languages ​​with non-functional / non-memory controlled. What methods exist to solve problems such as intermediate garbage? Cleaning up after lazynizess / thunk allocated memory. Performance (since you cannot easily share resources between immutable variables if you need to track its progress to free it (smart pointers?)

+3
source share
2 answers

You may be interested in programming languages ​​with linear or unique types, they can manage resources (and, in particular, memory). Recent examples: ATS and LinearML .

There have been attempts to “region-based memory management” (for example, Cyclone), but they have not been removed yet - regions also allow (earlier) memory recovery, but they are not enough (for example, there are programs that, when launched with region-based memory management, will demonstrate unacceptable performance). I think these two schemes can be mixed.

Back to your question, some ATS programs can run without garbage collection. (I will not say that such programs are written in a "functional" style, for example, in SML, but in a combination of imperative and first-order functional style.)

+2

, , Mlton . , , .

+1

All Articles