Live data from Hacker News

Mozilla Is Designing a New Programming Language Language Called Rust

readwriteweb.com

51–60 of 75 posts

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

#51
post #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.

Languages aren't a problem that needs fixing.

Keeping Multicore machines busy is a problem that needs fixing and it's also an example of a problem amenable to a solution in the form of a new language.

http://gigaom.com/2008/06/19/multicores-not-so-secret-proble...

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

#52

It looks a lot like JavaScript, maybe we could fix up JavaScript instead of inventing a whole new language. I'm just saying...

The key people behind Rust are also on Mozilla's JavaScript team (one of them is Brendan Eich, the creator of JavaScript), and they are active in the ECMA process that's defining ES5 and ES Harmony, which are "fixed up" versions of JavaScript. Firefox 4 contains one of the first implementations of many of the improvements in ES5.

But high-performance JavaScript VMs and rendering engines are not written in JavaScript; today they are mostly written in C++. Rust is designed by and targeted at the people implementing the VMs. It's the language they hope to use to implement future JavaScript compilers.

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

#53
post #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.

If you think we don't need any new languages then either you aren't doing anything interesting, aren't paying attention, or you just don't care.

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

#54
post #49

Earlier quoted context omitted.

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.

Sorry, I meant "inference for overloaded literals."

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

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

> * Rust does not have NULL!!

That hardly strikes me as a feature. Null pointers simplify a lot of error-checking. Don't know if what you got back was valid? As easy as checking to see if it's zero!

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

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

> * Rust does not have NULL!! That hardly strikes me as a feature. Null pointers simplify a lot of error-checking. Don't know if what you got back was valid? As easy as checking to see if it's zero!

The last time I checked, it was bootstrapped in OCaml. When I met Graydon several years ago (brilliant dude, PS), he was quite intrigued by OCaml, and strongly recommended I check it out. If ML had any influence at all, it uses variant types instead. About time more languages use them!

Rather than, "oh crap! every single variable could potentially be null at any time!", the few functions that can be null make you check for None / Some 'a, and that's it, no tedious null checks ever again. "Null pointers simplify a lot of error-checking.", my ass.

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

#57

Earlier quoted context omitted.

> * Rust does not have NULL!! That hardly strikes me as a feature. Null pointers simplify a lot of error-checking. Don't know if what you got back was valid? As easy as checking to see if it's zero!

The last time I checked, it was bootstrapped in OCaml. When I met Graydon several years ago (brilliant dude, PS), he was quite intrigued by OCaml, and strongly recommended I check it out. If ML had any influence at all , it uses variant types instead. About time more languages use them! Rather than, "oh crap! every single variable could potentially be null at any time !", the few functions that can be null make you c…

Yes, it does have variant types and pattern matching, and an option type in the standard library, just like ML.

Contrary to ML, it doesn't require variables to be initialized when declared. The typestate system checks (statically) that they are not referenced before initialized.

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

#58
post #21
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…

I'd like to see a better programming language. All of the existing languages involve accepting certain trade-offs. Of course maybe no "perfect" language can exist but until someone proves that there's always hope. For me the ideal language would : - Support OO, imperative and functional paradigms - Compile to fully optimized machine code with efficiency comparable to that of C - Provide language support for numerical…

Ocaml hits most of the points on your list, if you can bring yourself to use a statically typed language.

> Support OO, imperative and functional paradigms

Yep. Objects aren't used all that often but they are fully supported and can do some things that are difficult in Java or C++ eg http://caml.inria.fr/pub/docs/manual-ocaml/manual007.html#to...

> Compile to fully optimized machine code with efficiency comparable to that of C

Not quite, but ocamlopt generates pretty damn fast code and, more importantly, has very predictable performance. Ocaml makes a pretty good systems language as demonstrated by the recent Mirage paper: http://anil.recoil.org/papers/2010-hotcloud-lamp.pdf

> Provide language support for numerical multidimensional arrays and linear algebra with a syntax comparable to Matlab

No, but this would make a good Jane Street summer project. Ocaml has extensible syntax via camlp4 and bindings to R, GSL and Matlab (no octave bindings for some reason).

> Support list comprehensions

Yes, as a syntax extension. http://batteries.forge.ocamlcore.org/doc.preview:batteries-b...

> Provide map,list and set types similar to those of Python

The syntax is not as nice but apart from that:

http://caml.inria.fr/pub/docs/manual-ocaml/libref/Map.Make.h...

http://caml.inria.fr/pub/docs/manual-ocaml/libref/Hashtbl.ht...

http://caml.inria.fr/pub/docs/manual-ocaml/libref/List.html

http://caml.inria.fr/pub/docs/manual-ocaml/libref/Set.S.html

> Support dynamic typing

Nope. You can circumvent the type system using Obj but its generally not advisable.

> Support optional static typing, and contracts

Static typing - yes. Contracts - see eg

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.157...

http://perso.eleves.bretagne.ens-cachan.fr/~dagand/opis/opis...

> Provide standard libraries with breadth of functionality comparable to those of Java but simpler API's (more like Python)

No. Ocaml Batteries is a start but nowhere near as broad as Python or Java.

> Provide a mechanism for efficient compile-time parametrization of algorithms, like C++ templates

Not just compile time specialization but multi-stage compilation via MetaOcaml. See eg http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.73....

> Support free-form (ie. whitespace independent) syntax

Yep, although there are some issues with the syntax eg dangling-else-like problems with nested matches.

> Provide a high quality cross-platform GUI toolkit with support for OpenGL

Well tested bingdings to Tk, Gtk and OpenGL.

> Provide an interactive graphical environment for experimentation and data analysis

None that I know of. I tend to use matplotlib and opengl interactively from the repl but its not up to the standards of mathematica etc.

> Provide a dataset abstraction similar to R data frames

I dont think so. I haven't used R much so I don't know exactly what features are missing.

> Be supported by a high-quality IDE and debugger

There are a couple of IDEs but none of them seem to be very well polished. Ocaml-mode and emacs is generally the way to go.

The time-travelling ocaml debugger is pretty amazing. You can also compile with support for gdb for low level debugging.

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

#59
post #44

Earlier quoted context omitted.

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.

If you think we don't need any new languages then either you aren't doing anything interesting, aren't paying attention, or you just don't care.

Name some technological advance or achievement that has only been possible through the creation of a new programming language.

edit: Thanks for the downmod to 0. It really does speak volumes.

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

#60
post #44

Earlier quoted context omitted.

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.

Languages aren't a problem that needs fixing. Keeping Multicore machines busy is a problem that needs fixing and it's also an example of a problem amenable to a solution in the form of a new language. http://gigaom.com/2008/06/19/multicores-not-so-secret-proble...

We've been told for around 10 years now that we'll soon have 128 cores in our laptops. It hasn't happened yet.
Post reply on HN