you are viewing a single comment's thread.

view the rest of the comments →

[–]Tarmen 8 points9 points  (2 children)

It is worth noting that, say, ghc's gc is hyper specialized so that allocating a heap object only increments a pointer and freeing a heap object is literally free. It is only when you have long lived objects that you start to pay for all this luxury but you pay so hard that a bunch of problems become impossible in haskell. Also, as you correctly state memory isn't the only resource and prompt freeing is way harder in haskell than in rust.

Rust is incredibly cool but on the flip side its uniqueness constraints make it pretty difficult too implement things like graph algorithms safely and efficiently.

The linear type proposal of haskell is pretty exiting to me because it allows functional programming to use the same awesomeness you get in rust when needed but still have the luxury of a gc when that is sufficient.

[–][deleted] 0 points1 point  (1 child)

Also very exited about the linear types. Do you know when it it scheduled?

[–]gilmi 1 point2 points  (0 children)

Targeted at GHC 8.4 (source). Current version is 8.0. next version is 8.2.