Hacker News new | past | comments | ask | show | jobs | submit login

The third axis in compiler development is safety. The compiler writer’s dilemma can be framed as:

fast execution, safe execution, fast compilation — choose 2.




ADA.

This is a false(ish) dilema.

The problem of Rust is that is made with a C++ mindset. Is VERY hard to make compiler fast if it follow what C/C++ do (Go is the only evidence against!).

Is a death by thousands cut. The syntax is the FIRST and big one. How you chose it will impact all the pipeline. Then the rest...


Syntax parsing is nowhere close to the critical path for Rust, and I suspect there are no languages where it is today.


Ada isn't entirely safe. It does avoid C-string issues using length-based strings, bounds-checking array access and other features like access types instead of pointers, but it is still possible to hold onto an access to dynamically allocated memory after deletion (though you can somewhat mitigate this with smart pointers).


Sure, neither Rust.

But the things that make Rust safe are not that much slower. Macros, Generics, all that syntax, all that lang complexity (ie: Not just the semantics but the way is surfaced) have a bigger impact.


I choose 3, with OCaml :-)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: