Live data from Hacker News

What is Rust and why is it so popular?

stackoverflow.blog

1–10 of 284 posts

Re: What is Rust and why is it so popular?

#4
I think one of the biggest benefits of Rust is it bakes in static analysis of code as a first class feature. Which means the language is amenable to analysis and you don't have to use third party tools to benefit from it.

I also like some of the abstractions. They're clever in their simplicity. For example, an iterator over an array or vector is simply doing a for loop using pointers.

Re: What is Rust and why is it so popular?

#5

StackExchange Inc. making noise to distract from the deepening crisis with the public Q&A sites it owns. The post itself may be good or bad, I don't know - but I just can't bring myself to read their happy-go-lucky banter.

What "deepening crisis" is this?

Is it just the usual internet drama with a few people being unpleasant to each other and then storming off in a huff, or something more serious?

Re: What is Rust and why is it so popular?

#6

Rust newbie here. How do you fix the compile error for the example given? I imagine it has something to do with transferring ownership, but I’m not too sure.

Lots of these things that look like syntax problems are in fact design problems surfaced by the compiler.

The `nickname` variable holds onto a reference to the substring of `name`. Subsequently `name` is modified (cleared).

This forces you to think about the behaviour. Should the nickname remain constant even if the backing `name` string changes? Probably yes, so you'd take a copy at that point.

Re: What is Rust and why is it so popular?

#7
post #4

I think one of the biggest benefits of Rust is it bakes in static analysis of code as a first class feature. Which means the language is amenable to analysis and you don't have to use third party tools to benefit from it. I also like some of the abstractions. They're clever in their simplicity. For example, an iterator over an array or vector is simply doing a for loop using pointers.

I'd like to understand what you mean by baked in. Not only does vscode need a plugin, it needs a language server running to do the static analysis. Are there analysis capabilities without the language server?

Re: What is Rust and why is it so popular?

#10
post #4

I think one of the biggest benefits of Rust is it bakes in static analysis of code as a first class feature. Which means the language is amenable to analysis and you don't have to use third party tools to benefit from it. I also like some of the abstractions. They're clever in their simplicity. For example, an iterator over an array or vector is simply doing a for loop using pointers.

I'd like to understand what you mean by baked in. Not only does vscode need a plugin, it needs a language server running to do the static analysis. Are there analysis capabilities without the language server?

The compiler by its self can do it, if you run it.

I believe the language server is just for real time editor integration.

Post reply on HN