3 ms·
You raise good points and I suppose valid differences in focus will alter one's notion of nearness. Here's why I made the claim I did: > Rust that came from ML
by Cybiote 6y ago
You raise good points and I suppose valid differences in focus will alter one's notion of nearness. Here's why I made the claim I did:
> Rust that came from ML and that aren’t features of Haskell
> As I understand the history of algebraic data types and pattern matching, they first appeared in Hope, and from there they were added to ML, and later adopted by Hope’s successors
They appeared first in a practical form in Hope but I'm taken to understand that these ideas could already be found in Programs and their Proofs: An Algebraic Approach and the core ideas are clearly present in this 1968 paper by Burstall: http://www.cse.chalmers.se/edu/year/2010/course/DAT140_Types/Burstall.pdf http://www.cse.chalmers.se/edu/year/2010/course/DAT140_Types...
Creators of HOPE, VAX ML (which also had limited patterns and case analysis) and LCF/ML all influenced each other and played prominent roles in the design Standard ML, which would in turn strongly influence future functional languages, including Haskell and Ocaml. It's tricky to untangle the history but I don't think it's controversial to say SML popularized functional programming as prototypically understood today (before Haskell evangelized it further).
> Rust’s two most prominent type system features are lifetimes and traits
Other than the initial prototype being written in Ocaml, I'd say Rust's pragmatic feel: eager evaluation, immutability by default but a hatch to mutability and the implementation of the features listed in the posted article all make it feel more like an ML. I agree, though, that this is a subjective take.
- fanf2 6y agoThere is a good list of ways Rust has a more ML vibe than Haskell here https://lobste.rs/s/nwtarh/haskell_s_children#c_quph8k https://lobste.rs/s/nwtarh/haskell_s_children#c_quph8k in aspects of Rust’s syntax and choice of type names