Live data from Hacker News

Mozilla Is Designing a New Programming Language Language Called Rust

readwriteweb.com

41–50 of 75 posts

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

#41
It may be that we'll see more languages in the future rather than seeing more language consolidation.

As Moore's Law for processor speeds hits a wall, programmers are going to have an incentive to take advantage of the parallel/multi-core CPUs that are appearing in lieu of actually faster CPUs.

Parallel programming is inherently less general-purpose than single threaded programming - there are a narrower range of things that you can do really quickly. I'd suspect that even doing that narrower range well will be more dependent on the memory/communications/threading model you use.

If this is true, it seems logical that we'll see a wider variety of languages in the future rather than having things consolidate. One language might better for simulation, another for 3D manipulation, etc. I'd also imagine chip-makers would start to look at the languages which can target

The standard Von Neumann architecture has allowed the general purpose computer to be relatively dominant product (even purpose built-machines often just leverage general-purpose chips). Parallel architecture would tend to allow the reappearance of purpose-built machines so-designed from the ground-up with all the differentiation that this world previously had.

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

#42
post #16

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.

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…

I don't know that all of the Go bullet points are correct. For one, Go doesn't have RAII or destructors specifically, but it has "defer" and runtime.SetFinalizer which provide similar capabilities. Also, does Go necessarily have global GC? My understanding is that it currently does, but that's not part of the language spec... could it not in theory use reference counting or per-thread GC?

The other points seem pretty dead-on.. Rust seems to prioritize safety over simplicity, which is probably a good thing.

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

#43
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…

New programming languages are never necessary, but they should scratch some itch. Something that was cumbersome in other languages should be easy in the new language. Or the new language should be the union of things that only existed disjointly in other languages. Rust seems to fall in that latter category.

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

#44
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…

There's a spectrum from machine code up to high level languages. Pretty much all the points on that spectrum already have languages on them.

We absolutely don't need any more languages. Languages aren't a problem that needs fixing.

But they're fun to create, which is why people keep creating them. Also it's very much a 'social' and fashion driven thing. Some people can't bear to be using 'last years' language.

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

#45
post #31

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.

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…

I think Rust is very interesting and quite exciting, but it's hard to evaluate in relation to other languages (for me, at least) because it is really really young. I've never seen a useful program written in Rust. All of the features sound really good in theory, but I've never used a similar language, so I don't have a sense for how these features work in practice.

Actually, anybody have a link to some non-trivial Rust code?

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

#46
post #38

Earlier quoted context omitted.

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.

And it's only garbage collected if you want it to be. (My friends are making an exokernel in D)

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

#47
post #31

Earlier quoted context omitted.

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…

I think Rust is very interesting and quite exciting, but it's hard to evaluate in relation to other languages (for me, at least) because it is really really young. I've never seen a useful program written in Rust. All of the features sound really good in theory, but I've never used a similar language, so I don't have a sense for how these features work in practice. Actually, anybody have a link to some non-trivial Ru…

The self hosted Rust compiler is probably the largest piece of Rust code right now:

https://github.com/graydon/rust/tree/master/src/comp/

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

#48
post #47

Earlier quoted context omitted.

I think Rust is very interesting and quite exciting, but it's hard to evaluate in relation to other languages (for me, at least) because it is really really young. I've never seen a useful program written in Rust. All of the features sound really good in theory, but I've never used a similar language, so I don't have a sense for how these features work in practice. Actually, anybody have a link to some non-trivial Ru…

The self hosted Rust compiler is probably the largest piece of Rust code right now: https://github.com/graydon/rust/tree/master/src/comp/

Awesome. Thanks for the link. Didn't realize that existed.

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

#49

Earlier quoted context omitted.

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.

That depends on your definition of "satisfactory" - F# uses strong type inference on literals and there is no ambiguity. Of course this means that distinguishing between types requires metadata, for example 42uy is an unsigned byte, 42L is an int64, 42I is a bigint and 42N is a BigRational. I think this is satisfactory, although you might disagree.

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

#50

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

We can treat minified Javascript as an IL and ignore it, if only we had some data format for source pointers and a few bits of additional debugger support. Someone could implement this in Chromium and Firefox and it might become a defacto standard.
Post reply on HN