Live data from Hacker News

Mozilla Is Designing a New Programming Language Language Called Rust

readwriteweb.com

31–40 of 75 posts

Re: Mozilla Is Designing a New Programming Language Language Called Rust

#31
post #3

> Ed Borasky recently commented here at ReadWriteHack: "We flat out don't need any more programming languages! What we need is efficient implementations of the ones we have now and IDEs / version control systems that enforce software engineering discipline." There was no need for assembly -- writing straight machine code worked. There was no need for C -- writing straight assembly worked. Etc, etc. There has never be…

It might be too soon to ask, but what distinguishes Rust from Google's Go or the D programming language? It seems to me that we've got three programming languages competing for the same niche.

Compared to Go:

* Rust does not have NULL!!

* Rust has parametric polymorphism.

* Rust has more predictable memory/cpu usage thanks to forgoing global GC for a novel memory management model based on stack allocation/RAII, immutability, isolated processes and reference counting.

* Rust has a very Erlang-like model of handling failures.

* Rust has typestate, which is an easy to use way of proving properties about your program statically, or check them dynamically via assertion.

* Rust has no shared mutable state.

Those are facts. My personal, more subjective, opinion is that Rust is a lot better thought out than either D or Go. If this niche is too crowded, I'd rather see them go and Rust win. :) But given that Rust lacks shared global GC, I guess you could say it's closer to C++

Re: Mozilla Is Designing a New Programming Language Language Called Rust

#32
post #27

Earlier quoted context omitted.

It might be too soon to ask, but what distinguishes Rust from Google's Go or the D programming language? It seems to me that we've got three programming languages competing for the same niche.

[deleted]

Rust is not very functional at all. E.g. no lambda, no closures (yet).

Re: Mozilla Is Designing a New Programming Language Language Called Rust

#34
post #14

Earlier quoted context omitted.

> And the word 'let' instead of 'def' or 'var' gives me a strange flashback to middle school which I can't quite pin down. I agree about the 'let' part. Why isn't "int i = 0;" sufficient?

Why would you have to specify it's an int when the compiler is perfectly able to discover that himself?

To make sure the programmer realizes this as well.

(It's a reasonable opinion, albeit not mine.)

Re: Mozilla Is Designing a New Programming Language Language Called Rust

#35
post #11

A new "systems" language? Really? What about an IL to replace Javascript as the lingua franca, rather than doing this?

Actually, Brendan discussed that very topic recently: http://www.aminutewithbrendan.com/pages/20101122

His argument against Bytecode is unconvincing, in particular version hell and optimization limits in bytecode. The part that is convincing is the fact that we can't get vendors to agree on a bytecode.

It's unfortunate that the most popular platform in the world will continue to look like it was cobbled together by CS 101 studwents who weren't particularly great students, and were drunk.

People thought Windows 2.0 was bad as a platform. It's like we have Windows 2.0 for the life of the web because there's too many vendors in conflict to actually make it decent.

Re: Mozilla Is Designing a New Programming Language Language Called Rust

#36
Kudos to Mozilla. The chance of failure for this project is very high -- there's lots of new languages coming out all the time, and existing languages have huge infrastructure advantages. It's nice to see organizations take a flyer on something that has the potential to really make our lives a lot better.

Rust's design decisions make much more sense than Go. Rather than designing C+++, they've ditched shared mutable state, a global GC and null pointers, and the stupid parts of the C syntax.

Re: Mozilla Is Designing a New Programming Language Language Called Rust

#37
post #14

Earlier quoted context omitted.

> And the word 'let' instead of 'def' or 'var' gives me a strange flashback to middle school which I can't quite pin down. I agree about the 'let' part. Why isn't "int i = 0;" sufficient?

Why would you have to specify it's an int when the compiler is perfectly able to discover that himself?

Is it an int? An int32? An int64? Is it unsigned? Maybe it's actually a float which just happens to be initialized to a valid integer value. In that case is it a float or a double?

Literals can map to multiple types, and there hasn't yet been discovered a satisfactory way--apart from guessing in cases of ambiguity--to support type inference for literals.

Re: Mozilla Is Designing a New Programming Language Language Called Rust

#38
post #16

Earlier quoted context omitted.

From https://github.com/graydon/rust/wiki/language-faq : *Have you seen this Google language, Go? How does Rust compare?* Yes. Rust development was several years underway before Go launched, no direct inspiration. Though Pike’s previous languages in the Go family (Newsqueak, Alef, Limbo) were influential. Go adopted semantics (safety and memory model) that are quite unsatisfactory. - Shared mutable state. - Global GC…

Thanks for that. It wasn't clear from the linked article that Rust was started before Go. The overall impression that I got from TFA was that Rust is another instance of the garbage-collected system language fad.

What are the other instances? Besides Go, I don't recall many languages that fit the bill. There's D, but it's not very new and certainly not a fad language.

Re: Mozilla Is Designing a New Programming Language Language Called Rust

#39

This seems to be fairly similar to Go. Given I don't know too much about either, what are the major differences?

See their FAQ: *Have you seen this Google language, Go? How does Rust compare?* Yes. Rust development was several years underway before Go launched, no direct inspiration. Though Pike’s previous languages in the Go family (Newsqueak, Alef, Limbo) were influential. Go adopted semantics (safety and memory model) that are quite unsatisfactory. - Shared mutable state. - Global GC. - Null pointers. - No RAII or destructor…

Indeed. Go seems inspired by the last 20 or 30 years of computer engineering (it is built from concepts that have been proven to work (and often not work) in the past), and Rust seems to take into account the last 20 or 30 years of research. In my view, Rust has more potential, but Go is a safer bet, at least until Rust has been used for a fair bit of Real Code (tm).

Re: Mozilla Is Designing a New Programming Language Language Called Rust

#40
post #3

> Ed Borasky recently commented here at ReadWriteHack: "We flat out don't need any more programming languages! What we need is efficient implementations of the ones we have now and IDEs / version control systems that enforce software engineering discipline." There was no need for assembly -- writing straight machine code worked. There was no need for C -- writing straight assembly worked. Etc, etc. There has never be…

Yes,

The boundary between a file format and a programming language is fairly fuzzy too.

I recently created a custom "little language" as a replacement for some rather fragile configuration routines. It won't need a lot of users to be a win.

(and no, it wouldn't have been faster/easier to use Lua/Ruby/Python etc).

Post reply on HN