Hacker News new | ask | show | jobs
by cmrdporcupine 951 days ago
Safety was something added to Rust as it developed, not one of the original goals. As I recall it.

And you're working with multiple definitions of "safety" here, and Rust sorta conflates them all via borrow checker, but the one people are usually most concerned with is memory safety which is not a concern for a garbage collected language.

I do seem to recall that StandardML did not have exceptions though. And I always felt that SML was the better language.

OCaml adding OO classes and exceptions and other 90s trends that actually have ended up not aging well...

2 comments

From the presentation introducing Rust to Mozilla: http://venge.net/graydon/talks/intro-talk-2.pdf

> I have been writing a compiled, concurrent, safe, systems programming language for the past four and a half years.

Safety was always part of it.

But those "Safety" definitions are all not like what Rust folks mean by safety now. He's talking about immutability and bounds checking and avoiding memory corruption but not at all about borrowing.

I guess I should have been more specific. If that's what we mean by safe, then OCaml is safe as well.

Anyways, I followed it at the time. The borrow checker came later.

I absolutely agree the borrow checker came later. I think of it as that the goals have always been the same, but the enforcement mechanism changed over time, as more and more static ways were found to achieve the goal.
I agree, Standard ML's syntax feels a lot cleaner than that of OCamls.
I think of OCaml like a "kitchen sink" language, much like Scala. The reference ML implementations like SML and Jersey seem to be much more limited in scope, and are nice for learning / getting a feel for the original intentions behind the language family.