Re:When a disk cache performs better than an in-memory cache
by catnaroek on Monday October 03, 2016 @01:49PM
(#12629641)
Why not both? I want both GC for recursive data structures (lists, trees, graphs, etc.) and Rust-style resource management when deterministic reclamation matters (files, GUI objects, etc.).
[ Parent
| on HN ]
Re:When a disk cache performs better than an in-memory cache
by bluejekyll on Monday October 03, 2016 @03:14PM
(#12630416)
This is something that is in discussion, though I don't know the status of any of the discussions:
https://internals.rust-lang.org/t/on-native-allocations-poin...
https://github.com/rust-lang/rfcs/blob/bdbe73d1be948dd925c6b...
Re:When a disk cache performs better than an in-memory cache
by catnaroek on Monday October 03, 2016 @05:13PM
(#12631376)
I should've been clearer: For low-level programming, Rust is already fine as it is. What I want is a high-level language that offers some of the benefits of Rust (safe deterministic non-memory resource management), without the unnecessarily low-level features (sized types and overemphasis on unique ownership). Due to its C++ heritage, Rust has a tendency to conflate ownership (a high-level concern) with indirection (a low-level one), which is fine for the niche it targets, but too inflexible for general-purpose programming, IMO.
Re:When a disk cache performs better than an in-memory cache
by fridsun on Monday October 03, 2016 @06:05PM
(#12631756)
OCaml or Haskell.
Re:When a disk cache performs better than an in-memory cache
by catnaroek on Monday October 03, 2016 @06:34PM
(#12631932)
Neither OCaml nor Haskell has substructural types. There's no way to tell their type systems “you can't use a file after it's been closed”. In fact, what I want can be summarized as “ML plus substructural types”! (But preferably with Standard ML as the base point, since OCaml has way too many warts for my taste.)