News for hackers. Stuff that matters.
Re:Two years of Rust by cwzwarich on Monday May 15, 2017 @04:09PM (#14344698)
How is Rust simpler? In terms of cognitive complexity on the part of the user, Modula-3 is much simpler; it is easier for a programmer to learn to write new Modula-3 code and correctly read Modula-3 code than it is for Rust code.

In terms of implementation complexity, Modula-3 is also much simpler, despite the existence of a GC. A Modula-3 spec would be a great deal smaller than an equivalently detailed Rust spec. Many people have independently implemented Modula-3, whereas an independent implementation of Rust is effectively impossible, due to all of the unspecified implementation-defined behaviors. If you told me I had 1 year to implement either language from scratch, I would much rather choose Modula-3.

Re:Two years of Rust by webkike on Monday May 15, 2017 @04:24PM (#14344810)
I'm talking about the mean distance in expectations between a program and the compiled output. I don't think Modula-3 is much more complicated or even moderately more complicated. I think it's all pedantry of personal definitions at this point. What makes a language "simple" or even "the most simple" aren't even questions that are possible to answer objectively.
Re:Two years of Rust by nickpsecurity on Monday May 15, 2017 @04:33PM (#14344871)
"I'm talking about the mean distance in expectations between a program and the compiled output."

Then you should be talking about Rust, C++, Java and other complex languages if that's your concern. Wirth-style languages use simple constructs that map straightforward to assembly. He actually designs the language in conjunction with the compiler so the simplicity is maintained. If it's hard to compile, he just takes it out of the language. Modula-3 adds select complexity to a Wirth-style language to give it exceptions, multithreading, and a standard library. Most of them are similarly straight-forward in implementation. It's why it compiles lightening-fast.

Re:Two years of Rust by steveklabnik on Monday May 15, 2017 @04:12PM (#14344729)
There are two alternative implementations of Rust in the works; one is _almost_ able to compile rustc at this point.
Re:Two years of Rust by cwzwarich on Monday May 15, 2017 @04:21PM (#14344783)
What are these implementations? The one I immediately found by searching (https://github.com/thepowersgang/mrustc) is accompanied by an explicit nongoal to correctly implement the language. It also doesn't seem particularly independent from rustc, given the similarities in implementation strategy and the fact that some parts look like rustc code converted to C++.
Re:Two years of Rust by steveklabnik on Monday May 15, 2017 @04:24PM (#14344803)
Mrustc is one; my understanding is that it isn't yet, because its purpose in life is to make bootstrapping/ddc stuff easier. Once that works, I thought it intended to add the stuff that's missing.

There's another that's not public.

Re:Two years of Rust by kibwen on Monday May 15, 2017 @08:58PM (#14346582)
> ddc stuff

Note: this refers to "Diverse Double Compilation", which is a mitigation tactic against Reflections-on-Trusting-Trust attacks.

Re:Two years of Rust by nickpsecurity on Tuesday May 16, 2017 @02:29PM (#14352057)
I suggest you email the team that did the C formal semantics about doing one for Rust. They did it in K Framework (Maude-based) with a front end, KCC, designed to be usable like GCC. Their other work includes functional and logic languages. A team that did an executable semantics for all of those seems ideal for a formalized compiler for Rust given it's like several styles combined. Their rewriting based tools could probably handle at least a subset. Then you get DDC for free plus a way to equivalence check reference compiler for certain features.

https://github.com/kframework/c-semantics

http://www.kframework.org/index.php/Main_Page