Live data from Hacker News

A Gentle Introduction to Rust

stevedonovan.github.io

31–40 of 60 posts

Re: A Gentle Introduction to Rust

#31
post #12
post #7

Why does every single rust promoting article have to bash on c++? They built a GC, good job. But, surely there is something else more worthy of typing about when hyping the language?

Who built a GC?

Manishearth did, as an experiment. :)

https://github.com/Manishearth/rust-gc

Re: A Gentle Introduction to Rust

#32

Earlier quoted context omitted.

To me, it feels like Rust really only has value to people who aren't already using C++14/17. The incremental benefit in certain areas is small, and it steps backwards in other areas.

Maybe I'm living in a special kind of bubble, but I have yet to meet a C++ programmer IRL who doesn't hate it.

Hello, now you know me. I leave that special spot for C.

Re: A Gentle Introduction to Rust

#33

Earlier quoted context omitted.

To me, it feels like Rust really only has value to people who aren't already using C++14/17. The incremental benefit in certain areas is small, and it steps backwards in other areas.

«The incremental benefit in certain areas is small, and it steps backwards in other areas.» As someone who doesn't know about C++ and Rust, can you elaborate on that?

Rust is better in that it enforces at language level best practices regarding memory use and thread safety, that are only possible in C++ via conventions or external tools like sanitizers.

C++ still wins down on available compilers, supported hardware and OSes, IDEs, debuggers, libraries, GUI tooling, SIMD, GPGPU, industry certifications for critical systems, ...

For example AUTOSAR just recently moved away from C to C++14 as suggested language for car computer systems, imagine how long it will take for them to suggest other language.

Re: A Gentle Introduction to Rust

#34
post #33

Earlier quoted context omitted.

«The incremental benefit in certain areas is small, and it steps backwards in other areas.» As someone who doesn't know about C++ and Rust, can you elaborate on that?

Rust is better in that it enforces at language level best practices regarding memory use and thread safety, that are only possible in C++ via conventions or external tools like sanitizers. C++ still wins down on available compilers, supported hardware and OSes, IDEs, debuggers, libraries, GUI tooling, SIMD, GPGPU, industry certifications for critical systems, ... For example AUTOSAR just recently moved away from C to…

You did not list any steps backwards just that the ecosystem is less mature

Re: A Gentle Introduction to Rust

#35

What makes Rust still rather inaccessible for me is the difficulty in finding «functions I can apply to an argument of type X» and «functions that return a value of type Y» other than, “read every last bit of API doc about everything and memorize it”.

The official docs have limited support for it, if you search for i32[0] the default facet is "in names" but you can use the "in parameters" and "in return types" tabs for these. I don't know how well these handle abstract types and it's nowhere near hoogle convenience, but there you are (there were efforts to port/replicate hoogle a few years back but the few I remember seem to have been abandoned, specifying a search syntax is probably non-trivial as well given Rust's signatures are not as convenient as Haskell's there)/

[0] https://doc.rust-lang.org/std/?search=i32

Re: A Gentle Introduction to Rust

#36
post #15

Earlier quoted context omitted.

I think you are a little unfair, expecting the guide to be towards complete beginners who would get confused by the language having curly braces or not... Rust is not a first language, it's a systems programming language. For previous programmers, the guide looks pretty good to me.

> Rust is not a first language, it's a systems programming language. Since when are sys prog langs not introductory languages anymore? I understand that using an dyn typed, interpreted, GCed lang is easier to get started with; but a whole (2) generation(s) of programmers has started with systems programming as their first experience, and I must say they seem well equipped for they jobs (maybe better so than those onl…

Thanks, that's a great letter which should get more exposure. The issue is ultimately vocational vs. professional. If someone wants to do data science then Python is appropriate, but someone who is going on to do CS is going to need something more rigorous. Traditionally there are two kinds of rigour (a) systems language with explicit memory management (learning the machine model) (b) functional language like Haskell or Scheme that forces a reboot of "what does programming mean?" and makes mathematical reasoning possible. With the right curriculum and supporting materials, Rust is nicely positioned to accommodate both kinds of rigour.

Re: A Gentle Introduction to Rust

#37
post #15

Earlier quoted context omitted.

> Rust is not a first language, it's a systems programming language. Since when are sys prog langs not introductory languages anymore? I understand that using an dyn typed, interpreted, GCed lang is easier to get started with; but a whole (2) generation(s) of programmers has started with systems programming as their first experience, and I must say they seem well equipped for they jobs (maybe better so than those onl…

Thanks, that's a great letter which should get more exposure. The issue is ultimately vocational vs. professional. If someone wants to do data science then Python is appropriate, but someone who is going on to do CS is going to need something more rigorous. Traditionally there are two kinds of rigour (a) systems language with explicit memory management (learning the machine model) (b) functional language like Haskell…

I'm not saying any way is better than the other. I see advantages/disadvantages either way. I do thing we should have a broad view, especially in higher education (not simply teach the specific trick that the industry needs, but teach generic skills that work no matter what field they are applied to).

While I was on the advisory board of an institution of higher education I tried to show them that "going with JS in the first year" because it is such a lingua franca is IMHO not the best choice. They did it anyway. They want the students to make flashy apps asap. I was proposing to use the SICP for the first years, mainly for two reasons:

* create a leveled playing field, as some students already know JS before starting the course

* learn concepts, not how-to-make-an-app (for which you have to know many techs that simply clutter the minds, like HTML and CSS)

> With the right curriculum and supporting materials, Rust is nicely positioned to accommodate both kinds of rigour.

Disagree. I think it does the (a) thing well, but only little of the (b) thing.

Re: A Gentle Introduction to Rust

#38
post #29
post #15

Earlier quoted context omitted.

> Rust is not a first language, it's a systems programming language. Since when are sys prog langs not introductory languages anymore? I understand that using an dyn typed, interpreted, GCed lang is easier to get started with; but a whole (2) generation(s) of programmers has started with systems programming as their first experience, and I must say they seem well equipped for they jobs (maybe better so than those onl…

At my university course, we did C in the first year for all programming courses. THen onto C++ in year 2 onwards, but all the fundamentals were in C. Now that same course goes straight to Java as the introductory language, alongside html / css and javascript. Now any sort of low(er) level language is avoid until year 2 when they do a course on C / C++ Which seems ass backwards to me. I also see some developers come i…

I also thing that a systems programming language should be a must on for any CS degree. Just so you know how the software is written that underpins/compiles/provides-the-runtime-for what you are creating in a higher level language. It's the link between the software and the hardware that becomes truly evident in these languages.

Re: A Gentle Introduction to Rust

#39
post #34
post #33

Earlier quoted context omitted.

Rust is better in that it enforces at language level best practices regarding memory use and thread safety, that are only possible in C++ via conventions or external tools like sanitizers. C++ still wins down on available compilers, supported hardware and OSes, IDEs, debuggers, libraries, GUI tooling, SIMD, GPGPU, industry certifications for critical systems, ... For example AUTOSAR just recently moved away from C to…

You did not list any steps backwards just that the ecosystem is less mature

Sure I did, lack of SIMD and GPGPU support for example.

If you prefer to be more specific, generics in Rust are still not as powerful as in C++, lacking const parameters and HKT, although they are coming.

Also compile time code execution is not yet supported, although quite a bit can be achieved with macros.

Re: A Gentle Introduction to Rust

#40
post #33

Earlier quoted context omitted.

«The incremental benefit in certain areas is small, and it steps backwards in other areas.» As someone who doesn't know about C++ and Rust, can you elaborate on that?

Rust is better in that it enforces at language level best practices regarding memory use and thread safety, that are only possible in C++ via conventions or external tools like sanitizers. C++ still wins down on available compilers, supported hardware and OSes, IDEs, debuggers, libraries, GUI tooling, SIMD, GPGPU, industry certifications for critical systems, ... For example AUTOSAR just recently moved away from C to…

So nothing about ADT, pattern matching, modules, better std, explicit unsafe and cargo?
Post reply on HN