3 ms·
The particular problem I was getting at was that the structural sharing required by purely functional data structures is not a natural or easy task when you're
by rbehrends 10y ago
The particular problem I was getting at was that the structural sharing required by purely functional data structures is not a natural or easy task when you're restricted by affine or linear types.
Several idiomatic functional programming techniques are similarly difficult to express with the additional invariants of affine types.
- pjmlp 10y agoYet there are quite a few programming languages considered functional with substructural type systems. Being easy or hard is not what defines FP.
- rbehrends 10y agoWell, that was in the context of the claim that "Rust is very much ML". We weren't talking about (say) BitC here. I've got nearly two decades worth of ML code lying around (mostly OCaml, some SML and F#) and for most of it rewriting it in Rust would require significant redesign for the reasons I mentioned. This starts with even very simple things like List.rev.
- pjmlp 10y ago> We weren't talking about (say) BitC here. No, we are talking in the context of ATS, LinearML, Idris, Mercury, F* and a few others.