Live data from Hacker News

Mozilla Is Designing a New Programming Language Language Called Rust

readwriteweb.com

21–30 of 75 posts

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

#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 multidimensional arrays and linear algebra with a syntax comparable to Matlab - Support list comprehensions - Provide map,list and set types similar to those of Python - Support dynamic typing - Support optional static typing, and contracts - Provide standard libraries with breadth of functionality comparable to those of Java but simpler API's (more like Python) - Provide a mechanism for efficient compile-time parametrization of algorithms, like C++ templates - Support free-form (ie. whitespace independent) syntax - Provide a high quality cross-platform GUI toolkit with support for OpenGL - Provide an interactive graphical environment for experimentation and data analysis - Provide a dataset abstraction similar to R data frames - Be supported by a high-quality IDE and debugger

Of course that's a lot to ask for, but it would be nice to be able to do everything with a single unified syntax and environment.

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

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

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.

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

#24
post #14

I tend to judge languages solely on their aesthetic utility unless they're designed to make something very difficult possible (e.g. Erlang). And this one isn't any more pleasant to read than Java or C, it just happens to be a little different. Given the long list of advantages to using Rust, why they can't use an existing syntax? Also, I've always felt queasy about using -> or => as arrows. And the word 'let' instead…

> 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?

int i = 0 not code because modern compilers don't need to know about int at first. The compiler wants to now that you creat a variable the type is not importend at that moment. Thats why most new languages like go or scala have the type after the inizalisation.

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

#25

Earlier quoted context omitted.

Not entirely sure what distinguishes them, but I'd rather have some competition in the niche than avoid defaulting to the first language that addresses the niche.

That's true, but this whole effort smells like an exercise in wheel re-invention to me.

If you know what you're doing, that's a valid way to try to make better wheels.

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

#26
post #14

I tend to judge languages solely on their aesthetic utility unless they're designed to make something very difficult possible (e.g. Erlang). And this one isn't any more pleasant to read than Java or C, it just happens to be a little different. Given the long list of advantages to using Rust, why they can't use an existing syntax? Also, I've always felt queasy about using -> or => as arrows. And the word 'let' instead…

> 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?

I suspect this is an artifact from their stance on mutable state, and some inspiration from more functional languages. There certainly isn't much harm in being clear where you are initializing variables. I would say that using actual english words rather than brief non-words such as def or var makes the syntax more readable.

If the keyword really bothers you that much, couldn't you fork the project and perform a global find/replace? (yes I realize that _maintaining_ a fork like that could be nightmarish, but the point still stands)

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

#27
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.

[deleted]

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

#28
post #24
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?

int i = 0 not code because modern compilers don't need to know about int at first. The compiler wants to now that you creat a variable the type is not importend at that moment. Thats why most new languages like go or scala have the type after the inizalisation.

> int i = 0 not code because modern compilers don't need to know about int at first.

Where "modern" means "any non-utterly-stupid compiler built in the last 40 years or so".

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

#29
post #14

I tend to judge languages solely on their aesthetic utility unless they're designed to make something very difficult possible (e.g. Erlang). And this one isn't any more pleasant to read than Java or C, it just happens to be a little different. Given the long list of advantages to using Rust, why they can't use an existing syntax? Also, I've always felt queasy about using -> or => as arrows. And the word 'let' instead…

> 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?

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

#30

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 destructors.
        - No type-parametric user code.

    There are a number of other fine coroutine / actor
    languages in development presently. It’s an area of
    focus across the PL community.
tl;dr, Rust seems to not ignore the last 20 or 30 years of computer science.
Post reply on HN