News for hackers. Stuff that matters.
Re:How I went about learning Rust by augustk on Friday July 15, 2022 @05:22AM (#32106302)
However, if I'm not mistaken, the language still has no formal specification.
Re:How I went about learning Rust by munificent on Friday July 15, 2022 @12:53PM (#32110179)
This is a somewhat heretical opinion but I don't think having a formal specification is particularly important for programming languages today.

It was very valuable, say, twenty years ago, when there were most programs were written or compiled using multiple closed source implementations of languages coming from competing companies. There were real economic incentives for the implementations to diverge from each other in ways that harmed the larger ecosystem. A formal spec was a forcing function to make those implementations compatible.

Today, programmers simply won't use a language whose implementation isn't open source with a very permissive license. This makes it very hard for an organization to deliberately make the implementation incompatible with others because other organizations and users are able to either avoid the incompatibility by forking the implementation if they don't like it, or making it compatible by using the implementation if they do.

I still think it's very valuable to have a committee with members of all implementations that helps drive consensus for where the language should go. But the document itself I see as secondary to that human process.

Re:How I went about learning Rust by augustk on Saturday July 23, 2022 @11:14AM (#32204045)
The value of a formal specification is the ability to reason about a program without having to compile and run it (using a specific implementation).
Re:How I went about learning Rust by vistro on Saturday July 30, 2022 @11:05AM (#32287330)
Good luck reasoning about C++ code. After all static analysis, sanitizers and whatever dynamic analysis, you still cannot be really sure that your code will blow up with undefined behavior.
Re:How I went about learning Rust by speed_spread on Friday July 15, 2022 @06:20AM (#32106606)
A second implementation based on GCC is underway and will help press this very issue.